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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x280
mov eax, dword [0x43637c]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor esi, esi
push edi
mov dword [ebp - 0x278], ecx
mov dword [ebp - 0x274], edi
mov dword [ebp - 0x26c], esi
mov dword [ebp - 0x268], esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x405a42
xor eax, eax
xor edx, edx
jmp 0x405c95
test al, 0x10
je 0x405c43
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, si
jne 0x405a4f
sub eax, edx
sar eax, 1
lea esi, [eax + 3]
xor ecx, ecx
push 2
pop edx
mov eax, esi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00411d83
mov ebx, eax
pop ecx
mov dword [ebp - 0x270], ebx
test ebx, ebx
je 0x405a39
push edi
push esi
push ebx
call fcn.0041373a
add esp, 0xc
push 0x42f990
push esi
push ebx
call fcn.004136bd
add esp, 0xc
lea eax, [ebp - 0x25c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x260], eax
cmp eax, 0xffffffff
jne 0x405ac2
push ebx
call fcn.00412f89
pop ecx
jmp 0x405a39
mov ebx, dword [sym.imp.KERNEL32.dll_FindNextFileW]
mov ecx, 0x42f998
lea eax, [ebp - 0x230]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x405af9
test dx, dx
je 0x405af5
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x405af9
add eax, 4
add ecx, 4
test dx, dx
jne 0x405ad3
xor eax, eax
jmp 0x405afe
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x405bfb
mov ecx, 0x42f99c
lea eax, [ebp - 0x230]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x405b37
test dx, dx
je 0x405b33
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x405b37
add eax, 4
add ecx, 4
test dx, dx
jne 0x405b11
xor eax, eax
jmp 0x405b3c
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x405bfb
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x405b49
sub eax, edx
sar eax, 1
mov ecx, eax
lea eax, [ebp - 0x230]
lea edx, [eax + 2]
mov si, word [eax]
inc eax
inc eax
test si, si
jne 0x405b62
sub eax, edx
sar eax, 1
lea edi, [eax + ecx + 2]
xor ecx, ecx
push 2
pop edx
mov eax, edi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00411d83
mov esi, eax
pop ecx
test esi, esi
je 0x405c2c
push dword [ebp - 0x274]
push edi
push esi
call fcn.0041373a
add esp, 0xc
push 0x42f6f4
push edi
push esi
call fcn.004136bd
add esp, 0xc
lea eax, [ebp - 0x230]
push eax
push edi
push esi
call fcn.004136bd
mov ecx, dword [ebp - 0x278]
add esp, 0xc
push esi
call fcn.004059fa
add dword [ebp - 0x26c], eax
push esi
adc dword [ebp - 0x268], edx
call fcn.00412f89
pop ecx
lea eax, [ebp - 0x25c]
push eax
push dword [ebp - 0x260]
call ebx
mov edi, dword [ebp - 0x274]
jmp 0x405c0a
lea eax, [ebp - 0x25c]
push eax
push dword [ebp - 0x260]
call ebx
test eax, eax
jne 0x405ac8
push dword [ebp - 0x260]
call dword [sym.imp.KERNEL32.dll_FindClose]
push dword [ebp - 0x270]
call fcn.00412f89
pop ecx
jmp 0x405c89
push dword [ebp - 0x260]
call dword [sym.imp.KERNEL32.dll_FindClose]
push dword [ebp - 0x270]
jmp 0x405ab7
push esi
push 0x80
push 3
push esi
push 1
push SysReAllocString
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
lea eax, [ebp - 0x27c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x27c]
mov dword [ebp - 0x26c], eax
mov eax, dword [ebp - 0x278]
mov dword [ebp - 0x268], eax
mov eax, dword [ebp - 0x26c]
mov edx, dword [ebp - 0x268]
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00412c50
leave
ret 4