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

Disassembly:
push ecx
push ecx
push ebx
push ebp
push esi
push edi
push dword [0x4893a8]
xor ebx, ebx
mov ebp, ebx
call fcn.00412f5c
mov edi, eax
call fcn.00408a0a
mov esi, dword [esp + 0x1c]
test esi, esi
jne 0x4082a0
mov esi, section..rdata
push ebx
push pe_nt_image_headers32
push 3
push ebx
push 1
push 0xc0000000
mov dword [edi + 0xc], ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileA]
push esi
call ebx
mov dword [edi], eax
cmp eax, 0xffffffff
jne 0x40833f
push 0
push pe_nt_image_headers32
push 3
push 0
push 1
push 0x80000000
push esi
call ebx
mov dword [edi], eax
cmp eax, 0xffffffff
jne 0x4082f6
push 0
push pe_nt_image_headers32
push 3
push 0
push 3
push 0x80000000
push esi
call ebx
mov dword [edi], eax
cmp dword [edi], 0xffffffff
mov dword [edi + 0xc], 1
jne 0x40833f
mov eax, dword [esp + 0x20]
xor ebx, ebx
push esi
mov dword [edi], ebx
mov dword [edi + 0x2c], eax
mov dword [edi + 0x18], ebx
call sub.MSVCRT.dll_strlen
pop ecx
inc eax
push eax
push ebx
push dword [0x488a44]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [edi + 4], eax
test eax, eax
je 0x40850f
push esi
push eax
call sub.MSVCRT.dll_strcpy
pop ecx
pop ecx
jmp 0x40850f
push 0
push dword [edi]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
and dword [edi + 0x18], ebp
mov ebx, eax
mov eax, dword [esp + 0x20]
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [edi + 0x2c], eax
cmp ebx, 3
jl 0x4083aa
push 0
lea eax, [esp + 0x18]
push eax
push 3
lea eax, [esp + 0x1c]
push eax
push dword [edi]
call esi
cmp dword [esp + 0x14], 3
jne 0x40839d
push 3
lea eax, [esp + 0x14]
push 0x47106c
push eax
call sub.MSVCRT.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x40839d
mov dword [edi + 0x18], 0xfde9
sub ebx, 3
jmp 0x4083aa
xor eax, eax
push eax
push eax
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test ebx, ebx
jle 0x4083d8
lea eax, [ebx + 2]
push eax
push 0
push dword [0x488a44]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [edi + 0x10], eax
test eax, eax
je 0x4083d8
push 0
lea ecx, [esp + 0x18]
push ecx
push ebx
push eax
push dword [edi]
call esi
mov ebx, dword [esp + 0x14]
mov eax, dword [edi + 0x10]
test eax, eax
je 0x40850f
xor ecx, ecx
mov word [eax + ebx], cx
mov esi, dword [edi + 0x10]
push 0xa
lea eax, [esi + ebx]
mov dword [edi + 0x14], eax
pop ebx
cmp esi, eax
jae 0x40850f
mov al, byte [esi]
cmp al, 0x20
je 0x408407
cmp al, 9
jne 0x40840a
inc esi
jmp 0x4083fd
mov al, byte [esi]
cmp al, 0x3b
jne 0x408449
inc esi
cmp byte [esi], 0x20
jne 0x408417
inc esi
push esi
push 2
lea eax, [edi + 0x1c]
push ebp
push eax
call fcn.00408528
add esp, 0x10
mov ebp, eax
jmp 0x40843f
mov cl, byte [esi]
cmp cl, bl
je 0x4084f8
cmp cl, 0xd
je 0x4084f8
inc esi
cmp byte [esi], 0
jne 0x40842b
jmp 0x4084f8
cmp al, 0x5b
jne 0x408491
inc esi
lea eax, [edi + 0x1c]
push esi
push 1
push ebp
push eax
call fcn.00408528
add esp, 0x10
mov ebp, eax
jmp 0x408471
mov al, byte [esi]
cmp al, 0x5d
je 0x40847b
cmp al, bl
je 0x408476
cmp al, 0xd
je 0x408476
inc esi
cmp byte [esi], 0
jne 0x408462
cmp byte [esi], 0x5d
jne 0x4084f8
mov byte [esi], 0
jmp 0x408488
cmp al, bl
je 0x4084fb
cmp al, 0xd
je 0x4084fc
inc esi
mov al, byte [esi]
test al, al
jne 0x408480
jmp 0x4084fc
cmp al, bl
je 0x4084fc
cmp al, 0xd
je 0x4084fc
mov edx, esi
jmp 0x4084ac
cmp al, 0x3d
je 0x4084b0
cmp al, 0xd
je 0x4084b0
cmp al, bl
je 0x4084b0
inc esi
mov al, byte [esi]
test al, al
jne 0x40849d
lea eax, [esi - 1]
jmp 0x4084c2
mov cl, byte [eax]
cmp cl, 0x20
je 0x4084c1
cmp cl, 9
jne 0x4084c6
dec eax
cmp eax, edx
ja 0x4084b5
mov byte [eax + 1], 0
inc esi
mov al, byte [esi]
cmp al, 0x20
je 0x4084ca
cmp al, 9
je 0x4084ca
push esi
push edx
lea eax, [edi + 0x1c]
push ebp
push eax
call fcn.00408528
add esp, 0x10
mov ebp, eax
jmp 0x4084f3
mov al, byte [esi]
cmp al, bl
je 0x4084f8
cmp al, 0xd
je 0x4084f8
inc esi
cmp byte [esi], 0
jne 0x4084e8
mov byte [esi], 0
inc esi
mov al, byte [esi]
cmp al, bl
je 0x4084fb
cmp al, 0xd
je 0x4084fb
cmp esi, dword [edi + 0x14]
jb 0x4083fd
mov eax, dword [edi]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
pop ecx
ret 8