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

Disassembly:
push ecx
push ecx
push ebx
push ebp
push esi
push edi
push dword [0x43e358]
xor ebx, ebx
mov ebp, ebx
call fcn.0040dea8
mov edi, eax
call fcn.00405ae7
mov esi, dword [esp + 0x1c]
test esi, esi
jne 0x4056e2
mov esi, 0x435002
push ebx
push pe_nt_image_headers32
push 3
push ebx
push 1
push 0xc0000000
mov dword [edi + 0xc], ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileA]
push esi
call ebx
mov dword [edi], eax
cmp eax, 0xffffffff
jne 0x405781
push 0
push pe_nt_image_headers32
push 3
push 0
push 1
push 0x80000000
push esi
call ebx
mov dword [edi], eax
cmp eax, 0xffffffff
jne 0x405738
push 0
push pe_nt_image_headers32
push 3
push 0
push 3
push 0x80000000
push esi
call ebx
mov dword [edi], eax
cmp dword [edi], 0xffffffff
mov dword [edi + 0xc], 1
jne 0x405781
mov eax, dword [esp + 0x20]
xor ebx, ebx
push esi
mov dword [edi], ebx
mov dword [edi + 0x2c], eax
mov dword [edi + 0x18], ebx
call sub.MSVCRT.dll_strlen
pop ecx
inc eax
push eax
push ebx
push dword [0x43e01c]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [edi + 4], eax
test eax, eax
je 0x405951
push esi
push eax
call sub.MSVCRT.dll_strcpy
pop ecx
pop ecx
jmp 0x405951
push 0
push dword [edi]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
and dword [edi + 0x18], ebp
mov ebx, eax
mov eax, dword [esp + 0x20]
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [edi + 0x2c], eax
cmp ebx, 3
jl 0x4057ec
push 0
lea eax, [esp + 0x18]
push eax
push 3
lea eax, [esp + 0x1c]
push eax
push dword [edi]
call esi
cmp dword [esp + 0x14], 3
jne 0x4057df
push 3
lea eax, [esp + 0x14]
push 0x435014
push eax
call sub.MSVCRT.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x4057df
mov dword [edi + 0x18], 0xfde9
sub ebx, 3
jmp 0x4057ec
xor eax, eax
push eax
push eax
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test ebx, ebx
jle 0x40581a
lea eax, [ebx + 2]
push eax
push 0
push dword [0x43e01c]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [edi + 0x10], eax
test eax, eax
je 0x40581a
push 0
lea ecx, [esp + 0x18]
push ecx
push ebx
push eax
push dword [edi]
call esi
mov ebx, dword [esp + 0x14]
mov eax, dword [edi + 0x10]
test eax, eax
je 0x405951
xor ecx, ecx
mov word [eax + ebx], cx
mov esi, dword [edi + 0x10]
push 0xa
lea eax, [esi + ebx]
mov dword [edi + 0x14], eax
pop ebx
cmp esi, eax
jae 0x405951
mov al, byte [esi]
cmp al, 0x20
je 0x405849
cmp al, 9
jne 0x40584c
inc esi
jmp 0x40583f
mov al, byte [esi]
cmp al, 0x3b
jne 0x40588b
inc esi
cmp byte [esi], 0x20
jne 0x405859
inc esi
push esi
push 2
lea eax, [edi + 0x1c]
push ebp
push eax
call fcn.0040596a
add esp, 0x10
mov ebp, eax
jmp 0x405881
mov cl, byte [esi]
cmp cl, bl
je 0x40593a
cmp cl, 0xd
je 0x40593a
inc esi
cmp byte [esi], 0
jne 0x40586d
jmp 0x40593a
cmp al, 0x5b
jne 0x4058d3
inc esi
lea eax, [edi + 0x1c]
push esi
push 1
push ebp
push eax
call fcn.0040596a
add esp, 0x10
mov ebp, eax
jmp 0x4058b3
mov al, byte [esi]
cmp al, 0x5d
je 0x4058bd
cmp al, bl
je 0x4058b8
cmp al, 0xd
je 0x4058b8
inc esi
cmp byte [esi], 0
jne 0x4058a4
cmp byte [esi], 0x5d
jne 0x40593a
mov byte [esi], 0
jmp 0x4058ca
cmp al, bl
je 0x40593d
cmp al, 0xd
je 0x40593e
inc esi
mov al, byte [esi]
test al, al
jne 0x4058c2
jmp 0x40593e
cmp al, bl
je 0x40593e
cmp al, 0xd
je 0x40593e
mov edx, esi
jmp 0x4058ee
cmp al, 0x3d
je 0x4058f2
cmp al, 0xd
je 0x4058f2
cmp al, bl
je 0x4058f2
inc esi
mov al, byte [esi]
test al, al
jne 0x4058df
lea eax, [esi - 1]
jmp 0x405904
mov cl, byte [eax]
cmp cl, 0x20
je 0x405903
cmp cl, 9
jne 0x405908
dec eax
cmp eax, edx
ja 0x4058f7
mov byte [eax + 1], 0
inc esi
mov al, byte [esi]
cmp al, 0x20
je 0x40590c
cmp al, 9
je 0x40590c
push esi
push edx
lea eax, [edi + 0x1c]
push ebp
push eax
call fcn.0040596a
add esp, 0x10
mov ebp, eax
jmp 0x405935
mov al, byte [esi]
cmp al, bl
je 0x40593a
cmp al, 0xd
je 0x40593a
inc esi
cmp byte [esi], 0
jne 0x40592a
mov byte [esi], 0
inc esi
mov al, byte [esi]
cmp al, bl
je 0x40593d
cmp al, 0xd
je 0x40593d
cmp esi, dword [edi + 0x14]
jb 0x40583f
mov eax, dword [edi]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
pop ecx
ret 8