Function at 0x40b8f9
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
lea ebp, [esp - 0x6c]
sub esp, 0x120
push ebx
push esi
push dword [ebp + 0x7c]
xor esi, esi
lea ecx, [ebp + 8]
mov dword [ebp + 0x64], esi
call fcn.0040676c
lea eax, [ebp + 8]
push eax
push 0x42e1b0
push dword [ebp + 0x78]
lea eax, [ebp + 0x24]
push eax
call fcn.0040b70f
add esp, 0xc
push eax
lea eax, [ebp + 0x40]
push eax
call fcn.0040b67f
add esp, 0xc
cmp dword [eax + 0x18], 8
jb 0x40b946
mov eax, dword [eax + 4]
jmp 0x40b949
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
sete byte [ebp + 0x6b]
xor ebx, ebx
push esi
inc ebx
push ebx
lea ecx, [ebp + 0x40]
call fcn.004049f8
push esi
push ebx
lea ecx, [ebp + 0x24]
call fcn.004049f8
cmp byte [ebp + 0x6b], 0
je 0x40b98f
mov ecx, dword [ebp + 0x74]
lea eax, [ebp + 8]
push eax
call fcn.0040676c
push esi
push ebx
lea ecx, [ebp + 8]
call fcn.004049f8
jmp 0x40bc77
mov ecx, dword [ebp + 0x7c]
push edi
push ebx
push 0xffffffffffffffff
lea eax, [ebp + 0x60]
push eax
mov dword [ebp + 0x60], 0x2e
call fcn.0040b3dc
mov edi, eax
cmp edi, 0xffffffff
jne 0x40b9b2
mov eax, dword [ebp + 0x7c]
jmp 0x40b9ee
mov ecx, dword [ebp + 0x7c]
lea eax, [ebp - 8]
push eax
mov dword [ebp + 0x64], ebx
call fcn.0040504d
mov ecx, dword [eax]
mov eax, dword [eax + 4]
lea eax, [eax + edi*2]
mov dword [ebp + 0x60], eax
lea eax, [ebp]
mov dword [ebp + 0x5c], ecx
mov ecx, dword [ebp + 0x7c]
push eax
call fcn.0040504d
push dword [ebp + 0x60]
lea ecx, [ebp + 0x40]
push dword [ebp + 0x5c]
push dword [eax + 4]
push dword [eax]
call fcn.0040b622
push eax
lea ecx, [ebp - 0x24]
call fcn.0040676c
test byte [ebp + 0x64], bl
je 0x40ba0a
and dword [ebp + 0x64], 0xfffffffe
push esi
push ebx
lea ecx, [ebp + 0x40]
call fcn.004049f8
cmp edi, 0xffffffff
jne 0x40ba28
or dword [ebp + 0x64], 2
push esi
lea ecx, [ebp + 0x40]
mov dword [ebp + 0x58], 7
call fcn.00404961
lea eax, [ebp + 0x40]
jmp 0x40ba60
mov ecx, dword [ebp + 0x7c]
or dword [ebp + 0x64], 4
lea eax, [ebp]
push eax
call fcn.0040504d
mov ecx, dword [eax]
mov eax, dword [eax + 4]
lea edi, [eax + edi*2]
lea eax, [ebp - 8]
mov dword [ebp + 0x5c], ecx
mov ecx, dword [ebp + 0x7c]
push eax
call fcn.0040b46d
push dword [eax + 4]
lea ecx, [ebp + 0x24]
push dword [eax]
push edi
push dword [ebp + 0x5c]
call fcn.0040b622
push eax
lea ecx, [ebp - 0x5c]
call fcn.0040676c
test byte [ebp + 0x64], 4
je 0x40ba7d
and dword [ebp + 0x64], 0xfffffffb
push esi
push ebx
lea ecx, [ebp + 0x24]
call fcn.004049f8
test byte [ebp + 0x64], 2
je 0x40ba8d
push esi
push ebx
lea ecx, [ebp + 0x40]
call fcn.004049f8
mov byte [ebp + 0x6b], 0
lea eax, [ebp - 0x5c]
push eax
lea eax, [ebp - 0x24]
push eax
push 0x42e1b0
push dword [ebp + 0x78]
lea eax, [ebp - 0x78]
push eax
call fcn.0040b70f
add esp, 0xc
push eax
lea eax, [ebp + 0x24]
push eax
call fcn.0040b67f
add esp, 0xc
push eax
lea eax, [ebp + 0x40]
push eax
call fcn.0040b67f
add esp, 0xc
push esi
push ebx
lea ecx, [ebp + 0x24]
call fcn.004049f8
push esi
push ebx
lea ecx, [ebp - 0x78]
call fcn.004049f8
cmp dword [ebp + 0x58], 8
mov eax, dword [ebp + 0x44]
jae 0x40bae7
lea eax, [ebp + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40bc42
mov dword [ebp + 0x64], ebx
push 7
xor eax, eax
pop ecx
mov word [ebp - 0x98], ax
lea edi, [ebp - 0x96]
rep stosd dword es:[edi], eax
push 0xa
stosw word es:[edi], ax
push 0x10
lea eax, [ebp - 0x98]
push eax
push dword [ebp + 0x64]
call fcn.00420b8f
add esp, 0x10
lea eax, [ebp - 0x5c]
push eax
lea eax, [ebp - 0x98]
push eax
push 0x42e1b8
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.0040b70f
add esp, 0xc
push eax
lea eax, [ebp - 0xb4]
push eax
call fcn.0040b70f
add esp, 0xc
push eax
lea eax, [ebp - 0x78]
push eax
call fcn.0040b67f
add esp, 0xc
push 0xffffffffffffffff
push esi
push eax
lea ecx, [ebp + 8]
call fcn.00404bbf
push esi
push ebx
lea ecx, [ebp - 0x78]
call fcn.004049f8
push esi
push ebx
lea ecx, [ebp - 0xb4]
call fcn.004049f8
push esi
push ebx
lea ecx, [ebp - 0x40]
call fcn.004049f8
lea eax, [ebp + 8]
push eax
push 0x42e1b0
push dword [ebp + 0x78]
lea eax, [ebp - 0x40]
push eax
call fcn.0040b70f
add esp, 0xc
push eax
lea eax, [ebp + 0x24]
push eax
call fcn.0040b67f
add esp, 0xc
push esi
push ebx
lea ecx, [ebp - 0x40]
call fcn.004049f8
cmp dword [ebp + 0x3c], 8
mov eax, dword [ebp + 0x28]
jae 0x40bbcb
lea eax, [ebp + 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push esi
lea ecx, [ebp + 0x24]
push ebx
cmp eax, 0xffffffff
je 0x40bbf3
call fcn.004049f8
inc dword [ebp + 0x64]
cmp dword [ebp + 0x64], 0x3e8
jl 0x40bafa
jmp 0x40bbfb
mov byte [ebp + 0x6b], bl
call fcn.004049f8
cmp byte [ebp + 0x6b], 0
jne 0x40bc2c
push str..copy
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.0040b70f
add esp, 0xc
push 0xffffffffffffffff
push esi
push eax
lea ecx, [ebp - 0x24]
call fcn.00404bbf
push esi
push ebx
lea ecx, [ebp - 0x40]
call fcn.004049f8
push esi
push ebx
lea ecx, [ebp + 0x40]
call fcn.004049f8
cmp byte [ebp + 0x6b], 0
je 0x40ba91
jmp 0x40bc4c
push esi
push ebx
lea ecx, [ebp + 0x40]
call fcn.004049f8
mov ecx, dword [ebp + 0x74]
lea eax, [ebp + 8]
push eax
call fcn.0040676c
push esi
push ebx
lea ecx, [ebp - 0x5c]
call fcn.004049f8
push esi
push ebx
lea ecx, [ebp - 0x24]
call fcn.004049f8
push esi
push ebx
lea ecx, [ebp + 8]
call fcn.004049f8
pop edi
mov eax, dword [ebp + 0x74]
pop esi
pop ebx
add ebp, 0x6c
leave
ret