Function at 0x4033e0
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x405800
push 0x404a00
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x838
push ebx
push esi
push edi
xor esi, esi
mov dword [ebp - 0x844], esi
mov byte [ebp - 0x420], 0
mov ecx, 0xff
xor eax, eax
lea edi, [ebp - 0x41f]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov byte [ebp - 0x82c], 0
mov ecx, 0xff
xor eax, eax
lea edi, [ebp - 0x82b]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov dword [ebp - 0x20], esi
mov ebx, dword [0x409c74]
mov eax, dword [ebp + 8]
cmp eax, esi
je 0x40367c
cmp word [eax], si
je 0x40367c
cmp dword [ebp + 0xc], esi
je 0x40367c
mov dword [ebp - 4], esi
push esi
push 0x80
push 3
push esi
push 3
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x848], edi
cmp edi, 0xffffffff
je 0x403643
mov dword [ebp - 0x42c], esi
mov dword [ebp - 0x428], esi
lea eax, [ebp - 0x42c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x4034b9
push 0x40a074
jmp 0x403638
mov edx, dword [ebp - 0x42c]
mov ecx, edx
mov eax, dword [ebp - 0x428]
or ecx, eax
je 0x403633
mov esi, dword [0x409c70]
xor ecx, ecx
cmp eax, ecx
jl 0x403633
jg 0x4034e9
cmp edx, esi
jbe 0x403633
push 0
mov ecx, dword [0x409c74]
push ecx
push eax
push edx
call fcn.004048d0
or eax, edx
jne 0x403633
push 2
push 0
mov edx, ebx
neg edx
push edx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x844]
push eax
push ebx
lea ecx, [ebp - 0x420]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 0x844], ebx
je 0x40353b
push 0x40a058
jmp 0x403638
mov ecx, ebx
lea esi, [ebp - 0x420]
lea edi, [ebp - 0x82c]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor eax, eax
mov esi, dword [ebp - 0x42c]
sub esi, ebx
mov dword [ebp - 0x838], esi
mov edi, dword [ebp - 0x428]
sbb edi, eax
mov dword [ebp - 0x834], edi
push 1
push ebx
lea ecx, [ebp - 0x420]
push ecx
push edi
push esi
call fcn.00401060
lea eax, [ebp + ebx - 0x597]
mov dword [ebp - 0x830], eax
push eax
call fcn.004036a0
test eax, eax
je 0x4035b2
mov eax, 1
mov dword [ebp - 0x424], eax
mov edx, dword [ebp + 0xc]
mov dword [edx], eax
mov dword [ebp - 0x20], eax
jmp 0x4035f4
push 2
push ebx
lea eax, [ebp - 0x82c]
push eax
push edi
push esi
call fcn.00401060
lea ebx, [ebp + ebx - 0x9a3]
mov dword [ebp - 0x830], ebx
push ebx
call fcn.004036a0
test eax, eax
je 0x4035f4
mov dword [ebp - 0x424], 2
mov ecx, dword [ebp + 0xc]
mov dword [ecx], 2
mov dword [ebp - 0x20], 1
mov edx, dword [ebp - 0x848]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x848], 0
mov edi, dword [ebp - 0x848]
mov dword [ebp - 4], 0xffffffff
call fcn.0040366b
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push 0x40a034
push 0x40f470
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov dword [ebp - 4], 0xffffffff
call fcn.0040366b
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8