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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43a5b6
mov eax, dword fs:[0]
push eax
sub esp, 0x178
mov eax, dword [0x44983c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov byte [ebp - 0x114], 0
push 0x103
push 0
lea eax, [ebp - 0x113]
push eax
call fcn.00429210
add esp, 0xc
mov dword [ebp - 0x170], 0x104
mov ecx, dword [ebp - 0x170]
push ecx
lea edx, [ebp - 0x114]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
cmp eax, dword [ebp - 0x170]
jne 0x405928
xor eax, eax
jmp 0x405bd9
lea eax, [ebp - 0x114]
push eax
lea ecx, [ebp - 0x12c]
call fcn.00401a30
mov dword [ebp - 4], 0
push 0
push 0
push 3
push 0
push 0
push 0x80000000
lea ecx, [ebp - 0x12c]
call fcn.004062b0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x160], eax
cmp dword [ebp - 0x160], 0xffffffff
jne 0x405998
mov dword [ebp - 0x174], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x12c]
call fcn.00401ac0
mov eax, dword [ebp - 0x174]
jmp 0x405bd9
push 0
mov ecx, dword [ebp - 0x160]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x158], eax
mov edx, dword [ebp - 0x158]
push edx
call fcn.00422811
add esp, 4
mov dword [ebp - 0x17c], eax
mov eax, dword [ebp - 0x17c]
mov dword [ebp - 0x15c], eax
push 0
lea ecx, [ebp - 0x148]
push ecx
mov edx, dword [ebp - 0x158]
push edx
mov eax, dword [ebp - 0x15c]
push eax
mov ecx, dword [ebp - 0x160]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x405a1d
mov dword [ebp - 0x184], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x12c]
call fcn.00401ac0
mov eax, dword [ebp - 0x184]
jmp 0x405bd9
mov byte [ebp - 0x149], 0
mov dword [ebp - 0x150], 0
push 0x442fe8
lea ecx, [ebp - 0x144]
call fcn.00401a30
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x144]
call fcn.00401b20
mov dword [ebp - 0x164], eax
movzx edx, byte [ebp - 0x149]
test edx, edx
jne 0x405b19
mov eax, dword [ebp - 0x158]
sub eax, dword [ebp - 0x164]
cmp dword [ebp - 0x150], eax
jae 0x405b19
mov ecx, dword [ebp - 0x15c]
add ecx, dword [ebp - 0x150]
movzx esi, byte [ecx]
push 0
lea ecx, [ebp - 0x144]
call fcn.00401b00
movsx edx, byte [eax]
cmp esi, edx
jne 0x405b05
mov byte [ebp - 0x149], 1
mov dword [ebp - 0x154], 0
jmp 0x405abf
mov eax, dword [ebp - 0x154]
add eax, 1
mov dword [ebp - 0x154], eax
mov ecx, dword [ebp - 0x154]
cmp ecx, dword [ebp - 0x164]
jge 0x405b05
mov edx, dword [ebp - 0x150]
add edx, dword [ebp - 0x154]
mov eax, dword [ebp - 0x15c]
movzx esi, byte [eax + edx]
mov ecx, dword [ebp - 0x154]
push ecx
lea ecx, [ebp - 0x144]
call fcn.00401b00
movsx edx, byte [eax]
cmp esi, edx
je 0x405b03
mov byte [ebp - 0x149], 0
jmp 0x405ab0
mov eax, dword [ebp - 0x150]
add eax, 1
mov dword [ebp - 0x150], eax
jmp 0x405a53
mov dword [ebp - 0x168], 0
movzx ecx, byte [ebp - 0x149]
test ecx, ecx
je 0x405b46
mov edx, dword [ebp - 0x164]
mov eax, dword [ebp - 0x150]
lea ecx, [eax + edx - 1]
mov dword [ebp - 0x168], ecx
jmp 0x405b79
mov dword [ebp - 0x180], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x144]
call fcn.00401ac0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x12c]
call fcn.00401ac0
mov eax, dword [ebp - 0x180]
jmp 0x405bd9
mov dword [ebp - 0x16c], 0
mov edx, dword [ebp - 0x15c]
add edx, dword [ebp - 0x168]
mov dword [ebp - 0x16c], edx
mov eax, dword [ebp - 0x158]
sub eax, dword [ebp - 0x168]
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
mov edx, dword [ebp - 0x16c]
mov dword [ebp - 0x178], edx
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x144]
call fcn.00401ac0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x12c]
call fcn.00401ac0
mov eax, dword [ebp - 0x178]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00422b72
mov esp, ebp
pop ebp
ret