Function at 0x417802
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 [0x4335e4]
xor esi, esi
mov dword [ebp - 8], esi
call fcn.00420056
mov edi, eax
call fcn.00417cf1
cmp dword [ebp + 8], esi
jne 0x41782e
mov dword [ebp + 8], 0x42200b
push esi
mov ebx, pe_nt_image_headers32
push ebx
push 3
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 1
push 0xc0000000
push dword [ebp + 8]
call esi
cmp eax, 0xffffffff
mov dword [edi], eax
jne 0x41786f
push 0
push ebx
push 3
push 0
push 1
push 0x80000000
push dword [ebp + 8]
call esi
cmp eax, 0xffffffff
mov dword [edi], eax
je 0x417a3d
xor ebx, ebx
push ebx
push dword [edi]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 3
mov dword [edi + 0x14], ebx
jl 0x4178cb
push ebx
lea eax, [ebp - 0xc]
push eax
push 3
lea eax, [ebp - 4]
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 0xc], 3
jne 0x4178c0
push 3
lea eax, [ebp - 4]
push 0x4220d4
push eax
call sub.MSVCRT.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x4178c0
mov dword [edi + 0x14], 0xfde9
sub esi, 3
jmp 0x4178cb
push ebx
push ebx
push ebx
push dword [edi]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp esi, ebx
jle 0x4178f9
lea eax, [esi + 2]
push eax
push ebx
push dword [0x432c1c]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp eax, ebx
mov dword [edi + 0xc], eax
je 0x4178f9
push ebx
lea ecx, [ebp - 0xc]
push ecx
push esi
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, dword [ebp - 0xc]
mov eax, dword [edi + 0xc]
cmp eax, ebx
je 0x417a6e
mov word [eax + esi], bx
mov eax, dword [edi + 0xc]
lea ecx, [eax + esi]
mov esi, eax
cmp esi, ecx
mov dword [edi + 0x10], ecx
mov bl, 0xa
jae 0x417a6e
mov al, byte [esi]
cmp al, 0x20
je 0x417927
cmp al, 9
jne 0x41792a
inc esi
jmp 0x41791d
mov al, byte [esi]
cmp al, 0x3b
jne 0x41796b
inc esi
cmp byte [esi], 0x20
jne 0x417937
inc esi
push esi
push 2
push dword [ebp - 8]
lea eax, [edi + 0x18]
push eax
call fcn.004177d2
add esp, 0x10
mov dword [ebp - 8], eax
jmp 0x417961
mov al, byte [esi]
cmp al, bl
je 0x417a24
cmp al, 0xd
je 0x417a24
inc esi
cmp byte [esi], 0
jne 0x41794e
jmp 0x417a24
cmp al, 0x5b
jne 0x4179ba
inc esi
push esi
push 1
push dword [ebp - 8]
lea eax, [edi + 0x18]
push eax
call fcn.004177d2
add esp, 0x10
mov dword [ebp - 8], eax
jmp 0x417996
mov al, byte [esi]
cmp al, 0x5d
je 0x4179a4
cmp al, bl
je 0x41799b
cmp al, 0xd
je 0x41799b
inc esi
cmp byte [esi], 0
jne 0x417987
cmp byte [esi], 0x5d
jne 0x417a24
mov byte [esi], 0
jmp 0x4179b1
cmp al, bl
je 0x417a27
cmp al, 0xd
je 0x417a28
inc esi
mov al, byte [esi]
test al, al
jne 0x4179a9
jmp 0x417a28
cmp al, bl
je 0x417a28
cmp al, 0xd
je 0x417a28
mov edx, esi
jmp 0x4179d5
cmp al, 0x3d
je 0x4179d9
cmp al, 0xd
je 0x4179d9
cmp al, bl
je 0x4179d9
inc esi
mov al, byte [esi]
test al, al
jne 0x4179c6
lea eax, [esi - 1]
jmp 0x4179eb
mov cl, byte [eax]
cmp cl, 0x20
je 0x4179ea
cmp cl, 9
jne 0x4179ef
dec eax
cmp eax, edx
ja 0x4179de
mov byte [eax + 1], 0
inc esi
mov al, byte [esi]
cmp al, 0x20
je 0x4179f3
cmp al, 9
je 0x4179f3
push esi
push edx
push dword [ebp - 8]
lea eax, [edi + 0x18]
push eax
call fcn.004177d2
add esp, 0x10
mov dword [ebp - 8], eax
jmp 0x417a1f
mov al, byte [esi]
cmp al, bl
je 0x417a24
cmp al, 0xd
je 0x417a24
inc esi
cmp byte [esi], 0
jne 0x417a14
mov byte [esi], 0
inc esi
mov al, byte [esi]
cmp al, bl
je 0x417a27
cmp al, 0xd
je 0x417a27
cmp esi, dword [edi + 0x10]
jb 0x41791d
jmp 0x417a6e
push dword [ebp + 8]
xor esi, esi
mov dword [edi], esi
mov dword [edi + 0x14], esi
call sub.MSVCRT.dll_strlen
pop ecx
inc eax
push eax
push esi
push dword [0x432c1c]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp eax, esi
mov dword [edi + 4], eax
je 0x417a6e
push dword [ebp + 8]
push eax
call sub.MSVCRT.dll_strcpy
pop ecx
pop ecx
mov eax, dword [edi]
pop edi
pop esi
pop ebx
leave
ret 4