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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
xor ebx, ebx
push edi
mov dword [ebp - 0xc], ebx
call fcn.0040578b
cmp dword [ebp + 8], ebx
jne 0x4057e5
mov dword [ebp + 8], 0x41001c
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push ebx
mov edi, pe_nt_image_headers32
push edi
push 3
push ebx
push 1
push 0xc0000000
push dword [ebp + 8]
mov dword [0x415fa4], ebx
call esi
mov dword [0x415f98], eax
cmp eax, 0xffffffff
jne 0x405856
push ebx
push edi
push 3
push ebx
push 1
mov ebx, 0x80000000
push ebx
push dword [ebp + 8]
call esi
mov dword [0x415f98], eax
cmp eax, 0xffffffff
jne 0x405841
push 0
push edi
push 3
push 0
push 3
push ebx
push dword [ebp + 8]
call esi
mov dword [0x415f98], eax
mov dword [0x415fa4], 1
cmp eax, 0xffffffff
je 0x405ae7
xor ebx, ebx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [ebp + 0xc]
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
push 3
pop esi
mov dword [ebp - 8], eax
mov dword [0x415fb0], ebx
mov dword [0x415fc4], ecx
cmp eax, esi
jl 0x4058c8
push ebx
lea eax, [ebp - 0x10]
push eax
push esi
lea eax, [ebp - 4]
push eax
push dword [0x415f98]
call edi
cmp dword [ebp - 0x10], esi
jne 0x4058b9
push esi
lea eax, [ebp - 4]
push 0x410030
push eax
call sub.MSVCRT.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x4058b9
sub dword [ebp - 8], esi
mov dword [0x415fb0], 0xfde9
jmp 0x4058c8
push ebx
push ebx
push ebx
push dword [0x415f98]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [ebp - 8]
cmp eax, ebx
jle 0x40599c
add eax, 2
push eax
push ebx
push dword [0x4157cc]
cmp dword [0x415fb0], ebx
jne 0x405972
mov esi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
call esi
mov dword [ebp + 8], eax
cmp eax, ebx
je 0x40599c
mov eax, dword [ebp - 8]
lea eax, [eax*4 + 2]
push eax
push ebx
push dword [0x4157cc]
call esi
mov dword [0x415fa8], eax
cmp eax, ebx
je 0x405b30
push ebx
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 8]
push dword [ebp + 8]
push dword [0x415f98]
call edi
mov eax, dword [ebp - 0x10]
mov dword [ebp + 0xc], eax
mov eax, dword [ebp - 8]
shl eax, 2
mov dword [ebp - 8], eax
lea eax, [ebp + 0xc]
push eax
push dword [ebp + 8]
lea eax, [ebp - 8]
push eax
push dword [0x415fa8]
call fcn.0040e3c0
push dword [ebp + 8]
mov dword [0x415fb0], 0xfde9
push ebx
push dword [0x4157cc]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x40599c
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [0x415fa8], eax
cmp eax, ebx
je 0x405b30
push ebx
lea ecx, [ebp - 0x10]
push ecx
push dword [ebp - 8]
push eax
push dword [0x415f98]
call edi
mov eax, dword [ebp - 0x10]
mov dword [ebp - 8], eax
mov eax, dword [0x415fa8]
cmp eax, ebx
je 0x405b30
mov edx, dword [ebp - 8]
xor ecx, ecx
mov word [eax + edx], cx
mov esi, dword [0x415fa8]
mov eax, dword [ebp - 8]
add eax, esi
mov dword [0x415fac], eax
mov edi, 0x415fb4
mov bl, 0xa
cmp esi, eax
jae 0x405b30
mov al, byte [esi]
cmp al, 0x20
je 0x4059db
cmp al, 9
jne 0x4059de
inc esi
jmp 0x4059d1
mov al, byte [esi]
cmp al, 0x3b
jne 0x405a1c
inc esi
cmp byte [esi], 0x20
jne 0x4059eb
inc esi
push esi
push 2
push dword [ebp - 0xc]
push edi
call fcn.00405796
add esp, 0x10
mov dword [ebp - 0xc], eax
jmp 0x405a12
mov al, byte [esi]
cmp al, bl
je 0x405acb
cmp al, 0xd
je 0x405acb
inc esi
cmp byte [esi], 0
jne 0x4059ff
jmp 0x405acb
cmp al, 0x5b
jne 0x405a64
inc esi
push esi
push 1
push dword [ebp - 0xc]
push edi
call fcn.00405796
add esp, 0x10
mov dword [ebp - 0xc], eax
jmp 0x405a44
mov al, byte [esi]
cmp al, 0x5d
je 0x405a4e
cmp al, bl
je 0x405a49
cmp al, 0xd
je 0x405a49
inc esi
cmp byte [esi], 0
jne 0x405a35
cmp byte [esi], 0x5d
jne 0x405acb
mov byte [esi], 0
jmp 0x405a5b
cmp al, bl
je 0x405ace
cmp al, 0xd
je 0x405acf
inc esi
mov al, byte [esi]
test al, al
jne 0x405a53
jmp 0x405acf
cmp al, bl
je 0x405acf
cmp al, 0xd
je 0x405acf
mov edx, esi
jmp 0x405a7f
cmp al, 0x3d
je 0x405a83
cmp al, 0xd
je 0x405a83
cmp al, bl
je 0x405a83
inc esi
mov al, byte [esi]
test al, al
jne 0x405a70
lea eax, [esi - 1]
jmp 0x405a95
mov cl, byte [eax]
cmp cl, 0x20
je 0x405a94
cmp cl, 9
jne 0x405a99
dec eax
cmp eax, edx
ja 0x405a88
mov byte [eax + 1], 0
inc esi
mov al, byte [esi]
cmp al, 0x20
je 0x405a9d
cmp al, 9
je 0x405a9d
push esi
push edx
push dword [ebp - 0xc]
push edi
call fcn.00405796
add esp, 0x10
mov dword [ebp - 0xc], eax
jmp 0x405ac6
mov al, byte [esi]
cmp al, bl
je 0x405acb
cmp al, 0xd
je 0x405acb
inc esi
cmp byte [esi], 0
jne 0x405abb
mov byte [esi], 0
inc esi
mov al, byte [esi]
cmp al, bl
je 0x405ace
cmp al, 0xd
je 0x405ace
cmp esi, dword [0x415fac]
jb 0x4059d1
jmp 0x405b30
mov eax, dword [ebp + 0xc]
push dword [ebp + 8]
and dword [0x415f98], 0
mov dword [0x415fc4], eax
mov dword [0x415fb0], 0xfde9
call sub.MSVCRT.dll_wcslen
pop ecx
lea eax, [eax + eax + 2]
push eax
push 0
push dword [0x4157cc]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [0x415f9c], eax
test eax, eax
je 0x405b30
push dword [ebp + 8]
push eax
call sub.MSVCRT.dll_wcscpy
pop ecx
pop ecx
mov eax, dword [0x415f98]
pop edi
pop esi
pop ebx
leave
ret 8