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

Disassembly:
push 0xffffffffffffffff
push 0x418d26
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x170
mov eax, dword [0x421204]
push ebx
push esi
mov esi, dword [esp + 0x188]
push edi
xor ebx, ebx
cmp esi, ebx
mov edi, ecx
mov dword [esp + 0x178], eax
mov dword [esp + 0xc], edi
je 0x402d14
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
je 0x402d14
lea eax, [esp + 0x38]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
je 0x402d14
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
push ebx
push 0x80
push 3
push ebx
push ebx
push 0x80000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
mov dword [esp + 0x18], esi
je 0x402d14
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, ebx
jne 0x402d1b
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
jmp 0x403071
push ebp
push 0xc
call fcn.004121c2
mov ebp, eax
add esp, 4
cmp ebp, ebx
mov dword [esp + 0x30], ebp
je 0x403047
push ebx
lea eax, [esp + 0x18]
push eax
mov dword [ebp], 0xc
xor ecx, ecx
push 0xc
mov edx, ebp
mov dword [edx], ecx
push ebp
mov dword [edx + 4], ecx
push esi
mov dword [edx + 8], ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [esp + 0x14], 1
jb 0x403047
mov ecx, dword [ebp + 4]
mov eax, 0xbacf914d
mul ecx
sub ecx, edx
shr ecx, 1
add ecx, edx
shr ecx, 7
mov dword [edi + 0x24], ecx
lea ecx, [edi + 0x10]
call fcn.00407410
cmp dword [edi + 0x24], ebx
mov dword [esp + 0x18], ebx
jbe 0x402eae
lea ecx, [ecx]
push 0x94
call fcn.004121c2
mov ebp, eax
add esp, 4
cmp ebp, ebx
mov dword [esp + 0x38], ebp
je 0x403047
push ebx
lea ecx, [esp + 0x18]
push ecx
push 0x94
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [esp + 0x14], 1
jb 0x403047
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov edx, dword [ebp + 0x24]
push edx
lea edi, [ebp + 4]
push edi
lea ecx, [esp + 0x28]
mov dword [esp + 0x190], ebx
call fcn.00401040
mov ecx, dword [ebp + 0x24]
mov edx, ecx
mov esi, eax
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
push esi
rep stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, eax
shr ecx, 2
lea edi, [ebp + 4]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 0x8c]
push ecx
lea edi, [ebp + 0x28]
push edi
lea ecx, [esp + 0x28]
mov dword [esp + 0x3c], edi
call fcn.00401040
mov ecx, dword [ebp + 0x8c]
mov edx, ecx
mov esi, eax
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
push esi
rep stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, dword [esp + 0x34]
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x38]
push ecx
mov ecx, dword [esp + 0x14]
add ecx, 0x10
call fcn.00402c40
lea ecx, [esp + 0x20]
mov dword [esp + 0x188], 0xffffffff
call section..text
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
mov ecx, dword [edx + 0x24]
mov esi, dword [esp + 0x1c]
inc eax
cmp eax, ecx
mov dword [esp + 0x18], eax
jb 0x402d90
mov ebp, dword [esp + 0x30]
mov edi, edx
mov eax, 0xdee95c4d
mul dword [ebp + 8]
mov eax, dword [edi + 0x1c]
shr edx, 9
cmp eax, ebx
mov dword [edi + 0x20], edx
je 0x402eca
mov ecx, edi
call fcn.00401dd0
mov eax, dword [edi + 0x20]
shl eax, 2
push eax
call fcn.0041163d
mov dword [edi + 0x1c], eax
mov eax, dword [edi + 0x20]
add esp, 4
cmp eax, ebx
mov dword [esp + 0x18], ebx
jbe 0x40305a
jmp 0x402ef0
push 0x24c
call fcn.004121c2
mov ebp, eax
add esp, 4
cmp ebp, ebx
je 0x403047
push ebx
lea ecx, [esp + 0x18]
push ecx
push 0x24c
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [esp + 0x14]
mov eax, 1
cmp ecx, eax
jb 0x403047
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov edx, dword [ebp + 0x24]
push edx
lea ebx, [ebp + 4]
push ebx
lea ecx, [esp + 0x28]
mov dword [esp + 0x190], eax
call fcn.00401040
mov ecx, dword [ebp + 0x24]
mov edx, ecx
mov esi, eax
shr ecx, 2
xor eax, eax
mov edi, ebx
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
push esi
rep stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, eax
shr ecx, 2
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 0x21c]
push ecx
lea ebx, [ebp + 0x28]
push ebx
lea ecx, [esp + 0x28]
call fcn.00401040
mov ecx, dword [ebp + 0x21c]
mov edx, ecx
mov esi, eax
shr ecx, 2
xor eax, eax
mov edi, ebx
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
push esi
rep stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, eax
shr ecx, 2
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 0x240]
push ecx
lea ebx, [ebp + 0x220]
push ebx
lea ecx, [esp + 0x28]
call fcn.00401040
mov ecx, dword [ebp + 0x240]
mov edx, ecx
mov esi, eax
shr ecx, 2
xor eax, eax
mov edi, ebx
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
push esi
rep stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, eax
shr ecx, 2
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x10]
mov ecx, dword [edi + 0x1c]
mov esi, dword [esp + 0x18]
mov dword [ecx + esi*4], ebp
lea ecx, [esp + 0x20]
mov dword [esp + 0x188], 0xffffffff
call section..text
mov eax, dword [edi + 0x20]
inc esi
mov dword [esp + 0x18], esi
cmp esi, eax
mov esi, dword [esp + 0x1c]
jae 0x403052
xor ebx, ebx
jmp 0x402ef0
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
jmp 0x403070
mov ebp, dword [esp + 0x30]
mov edi, dword [esp + 0x10]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebp
call fcn.004121bd
add esp, 4
mov byte [edi + 0x28], 1
mov al, 1
pop ebp
mov ecx, dword [esp + 0x17c]
pop edi
pop esi
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x170]
pop ebx
call fcn.00411d73
add esp, 0x17c
ret 4