Function at 0x402bf7
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.004030a2
cmp dword [ebp + 8], ebx
jne 0x402c16
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 [0x40caa0], eax
jne 0x402c5b
push ebx
push edi
push 3
push ebx
push 1
push 0x80000000
push dword [ebp + 8]
call esi
cmp eax, 0xffffffff
mov dword [0x40caa0], eax
je 0x402e34
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 [0x40cab4], ebx
jl 0x402cc4
push ebx
lea eax, [ebp - 0xc]
push eax
push 3
lea eax, [ebp - 4]
push eax
push dword [0x40caa0]
call esi
cmp dword [ebp - 0xc], 3
jne 0x402cb5
push 3
lea eax, [ebp - 4]
push 0x40a23c
push eax
call sub.MSVCRT.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x402cb5
mov dword [0x40cab4], 0xfde9
sub edi, 3
jmp 0x402cc4
push ebx
push ebx
push ebx
push dword [0x40caa0]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp edi, ebx
jle 0x402cf8
lea eax, [edi + 2]
push eax
push ebx
push dword [0x40c330]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp eax, ebx
mov dword [0x40caac], eax
je 0x402e6c
push ebx
lea ecx, [ebp - 0xc]
push ecx
push edi
push eax
push dword [0x40caa0]
call esi
mov edi, dword [ebp - 0xc]
mov eax, dword [0x40caac]
cmp eax, ebx
je 0x402e6c
mov word [eax + edi], bx
mov esi, dword [0x40caac]
lea eax, [esi + edi]
cmp esi, eax
mov dword [0x40cab0], eax
mov edi, 0x40cab8
jae 0x402e6c
mov al, byte [esi]
cmp al, 0x20
je 0x402d2e
cmp al, 9
jne 0x402d31
inc esi
jmp 0x402d24
mov al, byte [esi]
cmp al, 0x3b
jne 0x402d6e
inc esi
cmp byte [esi], 0x20
jne 0x402d3e
inc esi
push esi
push 2
push dword [ebp - 8]
push edi
call fcn.00402bc7
add esp, 0x10
mov dword [ebp - 8], eax
jmp 0x402d65
mov al, byte [esi]
cmp al, 0xa
je 0x402e19
cmp al, 0xd
je 0x402e19
inc esi
cmp byte [esi], bl
jne 0x402d52
jmp 0x402e19
cmp al, 0x5b
jne 0x402db4
inc esi
push esi
push 1
push dword [ebp - 8]
push edi
call fcn.00402bc7
add esp, 0x10
mov dword [ebp - 8], eax
jmp 0x402d96
mov al, byte [esi]
cmp al, 0x5d
je 0x402d9f
cmp al, 0xa
je 0x402d9a
cmp al, 0xd
je 0x402d9a
inc esi
cmp byte [esi], bl
jne 0x402d87
cmp byte [esi], 0x5d
jne 0x402e19
mov byte [esi], bl
jmp 0x402dab
cmp al, 0xa
je 0x402e1b
cmp al, 0xd
je 0x402e1c
inc esi
mov al, byte [esi]
cmp al, bl
jne 0x402da3
jmp 0x402e1c
cmp al, 0xa
je 0x402e1c
cmp al, 0xd
je 0x402e1c
mov edx, esi
jmp 0x402dcf
cmp al, 0x3d
je 0x402dd3
cmp al, 0xd
je 0x402dd3
cmp al, 0xa
je 0x402dd3
inc esi
mov al, byte [esi]
cmp al, bl
jne 0x402dc0
lea eax, [esi - 1]
jmp 0x402de5
mov cl, byte [eax]
cmp cl, 0x20
je 0x402de4
cmp cl, 9
jne 0x402de9
dec eax
cmp eax, edx
ja 0x402dd8
mov byte [eax + 1], bl
inc esi
mov al, byte [esi]
cmp al, 0x20
je 0x402dec
cmp al, 9
je 0x402dec
push esi
push edx
push dword [ebp - 8]
push edi
call fcn.00402bc7
add esp, 0x10
mov dword [ebp - 8], eax
jmp 0x402e15
mov al, byte [esi]
cmp al, 0xa
je 0x402e19
cmp al, 0xd
je 0x402e19
inc esi
cmp byte [esi], bl
jne 0x402e0a
mov byte [esi], bl
inc esi
mov al, byte [esi]
cmp al, 0xa
je 0x402e1b
cmp al, 0xd
je 0x402e1b
cmp esi, dword [0x40cab0]
jb 0x402d24
jmp 0x402e6c
push dword [ebp + 8]
mov dword [0x40caa0], ebx
mov dword [0x40cab4], ebx
call sub.MSVCRT.dll_strlen
pop ecx
inc eax
push eax
push ebx
push dword [0x40c330]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp eax, ebx
mov dword [0x40caa4], eax
je 0x402e6c
push dword [ebp + 8]
push eax
call sub.MSVCRT.dll_strcpy
pop ecx
pop ecx
mov eax, dword [0x40caa0]
pop edi
pop esi
pop ebx
leave
ret 4