Function at 0x402c17
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.004030c2
cmp dword [ebp + 8], ebx
jne 0x402c36
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 [0x40c964], eax
jne 0x402c7b
push ebx
push edi
push 3
push ebx
push 1
push 0x80000000
push dword [ebp + 8]
call esi
cmp eax, 0xffffffff
mov dword [0x40c964], eax
je 0x402e54
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 [0x40c978], ebx
jl 0x402ce4
push ebx
lea eax, [ebp - 0xc]
push eax
push 3
lea eax, [ebp - 4]
push eax
push dword [0x40c964]
call esi
cmp dword [ebp - 0xc], 3
jne 0x402cd5
push 3
lea eax, [ebp - 4]
push 0x40a23c
push eax
call sub.MSVCRT.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x402cd5
mov dword [0x40c978], 0xfde9
sub edi, 3
jmp 0x402ce4
push ebx
push ebx
push ebx
push dword [0x40c964]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp edi, ebx
jle 0x402d18
lea eax, [edi + 2]
push eax
push ebx
push dword [0x40c208]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp eax, ebx
mov dword [0x40c970], eax
je 0x402e8c
push ebx
lea ecx, [ebp - 0xc]
push ecx
push edi
push eax
push dword [0x40c964]
call esi
mov edi, dword [ebp - 0xc]
mov eax, dword [0x40c970]
cmp eax, ebx
je 0x402e8c
mov word [eax + edi], bx
mov esi, dword [0x40c970]
lea eax, [esi + edi]
cmp esi, eax
mov dword [0x40c974], eax
mov edi, 0x40c97c
jae 0x402e8c
mov al, byte [esi]
cmp al, 0x20
je 0x402d4e
cmp al, 9
jne 0x402d51
inc esi
jmp 0x402d44
mov al, byte [esi]
cmp al, 0x3b
jne 0x402d8e
inc esi
cmp byte [esi], 0x20
jne 0x402d5e
inc esi
push esi
push 2
push dword [ebp - 8]
push edi
call fcn.00402be7
add esp, 0x10
mov dword [ebp - 8], eax
jmp 0x402d85
mov al, byte [esi]
cmp al, 0xa
je 0x402e39
cmp al, 0xd
je 0x402e39
inc esi
cmp byte [esi], bl
jne 0x402d72
jmp 0x402e39
cmp al, 0x5b
jne 0x402dd4
inc esi
push esi
push 1
push dword [ebp - 8]
push edi
call fcn.00402be7
add esp, 0x10
mov dword [ebp - 8], eax
jmp 0x402db6
mov al, byte [esi]
cmp al, 0x5d
je 0x402dbf
cmp al, 0xa
je 0x402dba
cmp al, 0xd
je 0x402dba
inc esi
cmp byte [esi], bl
jne 0x402da7
cmp byte [esi], 0x5d
jne 0x402e39
mov byte [esi], bl
jmp 0x402dcb
cmp al, 0xa
je 0x402e3b
cmp al, 0xd
je 0x402e3c
inc esi
mov al, byte [esi]
cmp al, bl
jne 0x402dc3
jmp 0x402e3c
cmp al, 0xa
je 0x402e3c
cmp al, 0xd
je 0x402e3c
mov edx, esi
jmp 0x402def
cmp al, 0x3d
je 0x402df3
cmp al, 0xd
je 0x402df3
cmp al, 0xa
je 0x402df3
inc esi
mov al, byte [esi]
cmp al, bl
jne 0x402de0
lea eax, [esi - 1]
jmp 0x402e05
mov cl, byte [eax]
cmp cl, 0x20
je 0x402e04
cmp cl, 9
jne 0x402e09
dec eax
cmp eax, edx
ja 0x402df8
mov byte [eax + 1], bl
inc esi
mov al, byte [esi]
cmp al, 0x20
je 0x402e0c
cmp al, 9
je 0x402e0c
push esi
push edx
push dword [ebp - 8]
push edi
call fcn.00402be7
add esp, 0x10
mov dword [ebp - 8], eax
jmp 0x402e35
mov al, byte [esi]
cmp al, 0xa
je 0x402e39
cmp al, 0xd
je 0x402e39
inc esi
cmp byte [esi], bl
jne 0x402e2a
mov byte [esi], bl
inc esi
mov al, byte [esi]
cmp al, 0xa
je 0x402e3b
cmp al, 0xd
je 0x402e3b
cmp esi, dword [0x40c974]
jb 0x402d44
jmp 0x402e8c
push dword [ebp + 8]
mov dword [0x40c964], ebx
mov dword [0x40c978], ebx
call sub.MSVCRT.dll_strlen
pop ecx
inc eax
push eax
push ebx
push dword [0x40c208]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp eax, ebx
mov dword [0x40c968], eax
je 0x402e8c
push dword [ebp + 8]
push eax
call sub.MSVCRT.dll_strcpy
pop ecx
pop ecx
mov eax, dword [0x40c964]
pop edi
pop esi
pop ebx
leave
ret 4