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

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
xor ebp, ebp
push edi
mov dword [esp + 0x14], ebp
call fcn.0040a768
mov ebx, dword [esp + 0x20]
cmp ebx, ebp
jne 0x40a222
mov ebx, 0x41400f
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push ebp
mov edi, pe_nt_image_headers32
push edi
push 3
push ebp
push 1
push 0xc0000000
push ebx
mov dword [0x417294], ebp
call esi
cmp eax, 0xffffffff
mov dword [0x417288], eax
jne 0x40a28d
push ebp
push edi
push 3
push ebp
push 1
mov ebp, 0x80000000
push ebp
push ebx
call esi
cmp eax, 0xffffffff
mov dword [0x417288], eax
jne 0x40a278
push 0
push edi
push 3
push 0
push 3
push ebp
push ebx
call esi
mov dword [0x417288], eax
cmp eax, 0xffffffff
mov dword [0x417294], 1
je 0x40a478
xor ebp, ebp
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
push 3
mov edi, eax
pop ebx
cmp edi, ebx
mov dword [0x4172a0], ebp
jl 0x40a2f8
push ebp
lea eax, [esp + 0x1c]
push eax
push ebx
lea eax, [esp + 0x1c]
push eax
push dword [0x417288]
call esi
cmp dword [esp + 0x18], ebx
jne 0x40a2e9
push ebx
lea eax, [esp + 0x14]
push 0x4140b4
push eax
call sub.MSVCRT.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x40a2e9
mov dword [0x4172a0], 0xfde9
sub edi, ebx
jmp 0x40a2f8
push ebp
push ebp
push ebp
push dword [0x417288]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp edi, ebp
jle 0x40a32e
lea eax, [edi + 2]
push eax
push ebp
push dword [0x416b08]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp eax, ebp
mov dword [0x417298], eax
je 0x40a4ae
push ebp
lea ecx, [esp + 0x1c]
push ecx
push edi
push eax
push dword [0x417288]
call esi
mov edi, dword [esp + 0x18]
mov eax, dword [0x417298]
cmp eax, ebp
je 0x40a4ae
mov word [eax + edi], bp
mov esi, dword [0x417298]
lea eax, [esi + edi]
cmp esi, eax
mov dword [0x41729c], eax
mov edi, 0x4172a4
mov bl, 0xa
jae 0x40a4ae
mov al, byte [esi]
cmp al, 0x20
je 0x40a366
cmp al, 9
jne 0x40a369
inc esi
jmp 0x40a35c
mov al, byte [esi]
cmp al, 0x3b
jne 0x40a3a9
inc esi
cmp byte [esi], 0x20
jne 0x40a376
inc esi
push esi
push 2
push dword [esp + 0x1c]
push edi
call fcn.0040a1d3
add esp, 0x10
mov dword [esp + 0x14], eax
jmp 0x40a39f
mov al, byte [esi]
cmp al, bl
je 0x40a45c
cmp al, 0xd
je 0x40a45c
inc esi
cmp byte [esi], 0
jne 0x40a38c
jmp 0x40a45c
cmp al, 0x5b
jne 0x40a3f3
inc esi
push esi
push 1
push dword [esp + 0x1c]
push edi
call fcn.0040a1d3
add esp, 0x10
mov dword [esp + 0x14], eax
jmp 0x40a3d3
mov al, byte [esi]
cmp al, 0x5d
je 0x40a3dd
cmp al, bl
je 0x40a3d8
cmp al, 0xd
je 0x40a3d8
inc esi
cmp byte [esi], 0
jne 0x40a3c4
cmp byte [esi], 0x5d
jne 0x40a45c
mov byte [esi], 0
jmp 0x40a3ea
cmp al, bl
je 0x40a45f
cmp al, 0xd
je 0x40a460
inc esi
mov al, byte [esi]
test al, al
jne 0x40a3e2
jmp 0x40a460
cmp al, bl
je 0x40a460
cmp al, 0xd
je 0x40a460
mov edx, esi
jmp 0x40a40e
cmp al, 0x3d
je 0x40a412
cmp al, 0xd
je 0x40a412
cmp al, bl
je 0x40a412
inc esi
mov al, byte [esi]
test al, al
jne 0x40a3ff
lea eax, [esi - 1]
jmp 0x40a424
mov cl, byte [eax]
cmp cl, 0x20
je 0x40a423
cmp cl, 9
jne 0x40a428
dec eax
cmp eax, edx
ja 0x40a417
mov byte [eax + 1], 0
inc esi
mov al, byte [esi]
cmp al, 0x20
je 0x40a42c
cmp al, 9
je 0x40a42c
push esi
push edx
push dword [esp + 0x1c]
push edi
call fcn.0040a1d3
add esp, 0x10
mov dword [esp + 0x14], eax
jmp 0x40a457
mov al, byte [esi]
cmp al, bl
je 0x40a45c
cmp al, 0xd
je 0x40a45c
inc esi
cmp byte [esi], 0
jne 0x40a44c
mov byte [esi], 0
inc esi
mov al, byte [esi]
cmp al, bl
je 0x40a45f
cmp al, 0xd
je 0x40a45f
cmp esi, dword [0x41729c]
jb 0x40a35c
jmp 0x40a4ae
xor esi, esi
push ebx
mov dword [0x417288], esi
mov dword [0x4172a0], esi
call sub.MSVCRT.dll_strlen
pop ecx
inc eax
push eax
push esi
push dword [0x416b08]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp eax, esi
mov dword [0x41728c], eax
je 0x40a4ae
push ebx
push eax
call sub.MSVCRT.dll_strcpy
pop ecx
pop ecx
mov eax, dword [0x417288]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 4