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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
xor ebx, ebx
push edi
mov dword [ebp - 8], ebx
call fcn.004030b2
cmp dword [ebp + 8], ebx
jne 0x402c26
mov dword [ebp + 8], 0x40a213
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push ebx
mov edi, pe_nt_image_headers32
push edi
push 3
push ebx
push 1
push 0xc0000000
push dword [ebp + 8]
call esi
cmp eax, 0xffffffff
mov dword [0x40c97c], eax
jne 0x402c6b
push ebx
push edi
push 3
push ebx
push 1
push 0x80000000
push dword [ebp + 8]
call esi
cmp eax, 0xffffffff
mov dword [0x40c97c], eax
je 0x402e44
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
mov edi, eax
cmp edi, 3
mov dword [0x40c990], ebx
jl 0x402cd4
push ebx
lea eax, [ebp - 0xc]
push eax
push 3
lea eax, [ebp - 4]
push eax
push dword [0x40c97c]
call esi
cmp dword [ebp - 0xc], 3
jne 0x402cc5
push 3
lea eax, [ebp - 4]
push 0x40a23c
push eax
call sub.MSVCRT.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x402cc5
mov dword [0x40c990], 0xfde9
sub edi, 3
jmp 0x402cd4
push ebx
push ebx
push ebx
push dword [0x40c97c]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp edi, ebx
jle 0x402d08
lea eax, [edi + 2]
push eax
push ebx
push dword [0x40c220]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp eax, ebx
mov dword [0x40c988], eax
je 0x402e7c
push ebx
lea ecx, [ebp - 0xc]
push ecx
push edi
push eax
push dword [0x40c97c]
call esi
mov edi, dword [ebp - 0xc]
mov eax, dword [0x40c988]
cmp eax, ebx
je 0x402e7c
mov word [eax + edi], bx
mov esi, dword [0x40c988]
lea eax, [esi + edi]
cmp esi, eax
mov dword [0x40c98c], eax
mov edi, 0x40c994
jae 0x402e7c
mov al, byte [esi]
cmp al, 0x20
je 0x402d3e
cmp al, 9
jne 0x402d41
inc esi
jmp 0x402d34
mov al, byte [esi]
cmp al, 0x3b
jne 0x402d7e
inc esi
cmp byte [esi], 0x20
jne 0x402d4e
inc esi
push esi
push 2
push dword [ebp - 8]
push edi
call fcn.00402bd7
add esp, 0x10
mov dword [ebp - 8], eax
jmp 0x402d75
mov al, byte [esi]
cmp al, 0xa
je 0x402e29
cmp al, 0xd
je 0x402e29
inc esi
cmp byte [esi], bl
jne 0x402d62
jmp 0x402e29
cmp al, 0x5b
jne 0x402dc4
inc esi
push esi
push 1
push dword [ebp - 8]
push edi
call fcn.00402bd7
add esp, 0x10
mov dword [ebp - 8], eax
jmp 0x402da6
mov al, byte [esi]
cmp al, 0x5d
je 0x402daf
cmp al, 0xa
je 0x402daa
cmp al, 0xd
je 0x402daa
inc esi
cmp byte [esi], bl
jne 0x402d97
cmp byte [esi], 0x5d
jne 0x402e29
mov byte [esi], bl
jmp 0x402dbb
cmp al, 0xa
je 0x402e2b
cmp al, 0xd
je 0x402e2c
inc esi
mov al, byte [esi]
cmp al, bl
jne 0x402db3
jmp 0x402e2c
cmp al, 0xa
je 0x402e2c
cmp al, 0xd
je 0x402e2c
mov edx, esi
jmp 0x402ddf
cmp al, 0x3d
je 0x402de3
cmp al, 0xd
je 0x402de3
cmp al, 0xa
je 0x402de3
inc esi
mov al, byte [esi]
cmp al, bl
jne 0x402dd0
lea eax, [esi - 1]
jmp 0x402df5
mov cl, byte [eax]
cmp cl, 0x20
je 0x402df4
cmp cl, 9
jne 0x402df9
dec eax
cmp eax, edx
ja 0x402de8
mov byte [eax + 1], bl
inc esi
mov al, byte [esi]
cmp al, 0x20
je 0x402dfc
cmp al, 9
je 0x402dfc
push esi
push edx
push dword [ebp - 8]
push edi
call fcn.00402bd7
add esp, 0x10
mov dword [ebp - 8], eax
jmp 0x402e25
mov al, byte [esi]
cmp al, 0xa
je 0x402e29
cmp al, 0xd
je 0x402e29
inc esi
cmp byte [esi], bl
jne 0x402e1a
mov byte [esi], bl
inc esi
mov al, byte [esi]
cmp al, 0xa
je 0x402e2b
cmp al, 0xd
je 0x402e2b
cmp esi, dword [0x40c98c]
jb 0x402d34
jmp 0x402e7c
push dword [ebp + 8]
mov dword [0x40c97c], ebx
mov dword [0x40c990], ebx
call sub.MSVCRT.dll_strlen
pop ecx
inc eax
push eax
push ebx
push dword [0x40c220]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp eax, ebx
mov dword [0x40c980], eax
je 0x402e7c
push dword [ebp + 8]
push eax
call sub.MSVCRT.dll_strcpy
pop ecx
pop ecx
mov eax, dword [0x40c97c]
pop edi
pop esi
pop ebx
leave
ret 4