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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
push dword [0x40a6c0]
xor edi, edi
mov dword [ebp - 8], edi
call fcn.00405d66
mov esi, eax
call fcn.00402b63
cmp dword [ebp + 8], edi
jne 0x4026b6
mov dword [ebp + 8], 0x408020
push edi
mov ebx, pe_nt_image_headers32
push ebx
push 3
push edi
push 1
push 0xc0000000
push dword [ebp + 8]
mov dword [esi + 0xc], edi
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileA]
call edi
cmp eax, 0xffffffff
mov dword [esi], eax
jne 0x40271b
push 0
push ebx
push 3
push 0
push 1
push 0x80000000
push dword [ebp + 8]
call edi
cmp eax, 0xffffffff
mov dword [esi], eax
jne 0x40270b
push 0
push ebx
push 3
push 0
push 3
push 0x80000000
push dword [ebp + 8]
call edi
mov dword [esi], eax
cmp dword [esi], 0xffffffff
mov dword [esi + 0xc], 1
je 0x4028e9
xor ebx, ebx
push ebx
push dword [esi]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp edi, 3
mov dword [esi + 0x18], ebx
jl 0x402777
push ebx
lea eax, [ebp - 0xc]
push eax
push 3
lea eax, [ebp - 4]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 0xc], 3
jne 0x40276c
push 3
lea eax, [ebp - 4]
push 0x40801c
push eax
call sub.MSVCRT.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x40276c
mov dword [esi + 0x18], 0xfde9
sub edi, 3
jmp 0x402777
push ebx
push ebx
push ebx
push dword [esi]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp edi, ebx
jle 0x4027a5
lea eax, [edi + 2]
push eax
push ebx
push dword [0x40a4ec]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp eax, ebx
mov dword [esi + 0x10], eax
je 0x4027a5
push ebx
lea ecx, [ebp - 0xc]
push ecx
push edi
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edi, dword [ebp - 0xc]
mov eax, dword [esi + 0x10]
cmp eax, ebx
je 0x40291a
mov word [eax + edi], bx
mov eax, dword [esi + 0x10]
lea ecx, [eax + edi]
mov edi, eax
cmp edi, ecx
mov dword [esi + 0x14], ecx
mov bl, 0xa
jae 0x40291a
mov al, byte [edi]
cmp al, 0x20
je 0x4027d3
cmp al, 9
jne 0x4027d6
inc edi
jmp 0x4027c9
mov al, byte [edi]
cmp al, 0x3b
jne 0x402817
inc edi
cmp byte [edi], 0x20
jne 0x4027e3
inc edi
push edi
push 2
push dword [ebp - 8]
lea eax, [esi + 0x1c]
push eax
call fcn.0040265a
add esp, 0x10
mov dword [ebp - 8], eax
jmp 0x40280d
mov al, byte [edi]
cmp al, bl
je 0x4028d0
cmp al, 0xd
je 0x4028d0
inc edi
cmp byte [edi], 0
jne 0x4027fa
jmp 0x4028d0
cmp al, 0x5b
jne 0x402866
inc edi
push edi
push 1
push dword [ebp - 8]
lea eax, [esi + 0x1c]
push eax
call fcn.0040265a
add esp, 0x10
mov dword [ebp - 8], eax
jmp 0x402842
mov al, byte [edi]
cmp al, 0x5d
je 0x402850
cmp al, bl
je 0x402847
cmp al, 0xd
je 0x402847
inc edi
cmp byte [edi], 0
jne 0x402833
cmp byte [edi], 0x5d
jne 0x4028d0
mov byte [edi], 0
jmp 0x40285d
cmp al, bl
je 0x4028d3
cmp al, 0xd
je 0x4028d4
inc edi
mov al, byte [edi]
test al, al
jne 0x402855
jmp 0x4028d4
cmp al, bl
je 0x4028d4
cmp al, 0xd
je 0x4028d4
mov edx, edi
jmp 0x402881
cmp al, 0x3d
je 0x402885
cmp al, 0xd
je 0x402885
cmp al, bl
je 0x402885
inc edi
mov al, byte [edi]
test al, al
jne 0x402872
lea eax, [edi - 1]
jmp 0x402897
mov cl, byte [eax]
cmp cl, 0x20
je 0x402896
cmp cl, 9
jne 0x40289b
dec eax
cmp eax, edx
ja 0x40288a
mov byte [eax + 1], 0
inc edi
mov al, byte [edi]
cmp al, 0x20
je 0x40289f
cmp al, 9
je 0x40289f
push edi
push edx
push dword [ebp - 8]
lea eax, [esi + 0x1c]
push eax
call fcn.0040265a
add esp, 0x10
mov dword [ebp - 8], eax
jmp 0x4028cb
mov al, byte [edi]
cmp al, bl
je 0x4028d0
cmp al, 0xd
je 0x4028d0
inc edi
cmp byte [edi], 0
jne 0x4028c0
mov byte [edi], 0
inc edi
mov al, byte [edi]
cmp al, bl
je 0x4028d3
cmp al, 0xd
je 0x4028d3
cmp edi, dword [esi + 0x14]
jb 0x4027c9
jmp 0x40291a
push dword [ebp + 8]
xor edi, edi
mov dword [esi], edi
mov dword [esi + 0x18], edi
call sub.MSVCRT.dll_strlen
pop ecx
inc eax
push eax
push edi
push dword [0x40a4ec]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp eax, edi
mov dword [esi + 4], eax
je 0x40291a
push dword [ebp + 8]
push eax
call sub.MSVCRT.dll_strcpy
pop ecx
pop ecx
mov eax, dword [esi]
pop edi
pop esi
pop ebx
leave
ret 4