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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
xor ebx, ebx
push esi
push edi
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0xc], ebx
cmp dword [ebp + 8], ebx
je 0x40a03f
cmp dword [ebp + 0x14], 1
jl 0x40a03f
mov edi, dword [ebp + 0x10]
cmp edi, 1
jl 0x40a03f
mov ecx, dword [ebp + 0x18]
cmp ecx, ebx
je 0x40a03f
mov eax, dword [ebp + 0x1c]
cmp eax, ebx
je 0x40a03f
fldz
push ebx
push 0x80
push 3
push ebx
push 3
push SysReAllocString
push dword [ebp + 8]
mov byte [ecx], bl
fstp qword [eax]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
mov dword [ebp + 8], esi
cmp esi, ebx
je 0x40a03f
cmp esi, 0xffffffff
je 0x40a03f
mov eax, dword [ebp + 0x14]
dec eax
movzx eax, ax
mov dword [ebp - 0x10], eax
dec edi
movzx eax, di
push ebx
push esi
mov dword [ebp - 0x14], eax
mov dword [ebp + 0x10], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
lea ecx, [eax + 0x1000]
mov dword [ebp - 8], eax
mov eax, 0x1000
cmp ecx, eax
jbe 0x409e6b
mov eax, ecx
push 1
push eax
call fcn.00447e84
pop ecx
pop ecx
mov dword [ebp + 0x14], eax
cmp eax, ebx
je 0x40a033
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
push ebx
push ebx
push esi
call edi
push ebx
lea eax, [ebp - 8]
push eax
push dword [ebp - 8]
push dword [ebp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
xor esi, esi
cmp dword [ebp - 8], ebx
jbe 0x40a026
mov eax, dword [ebp + 0x14]
mov cl, byte [esi + eax]
cmp cl, 9
jne 0x409ec9
cmp byte [esi + eax + 1], 8
jne 0x409ec9
add esi, 6
mov cl, byte [esi + eax]
cmp cl, 0x10
jne 0x409ec9
inc dword [ebp + 0x10]
cmp cl, 0x7e
jne 0x409ef7
cmp byte [esi + eax + 1], 2
jne 0x409ef7
movzx edx, byte [esi + eax + 4]
cmp dx, word [ebp - 0x10]
jne 0x409ef7
movzx edx, byte [esi + eax + 6]
cmp dx, word [ebp - 0x14]
jne 0x409ef7
mov edx, dword [ebp + 0x10]
cmp edx, dword [ebp + 0xc]
je 0x409fca
cmp cl, 3
jne 0x409f25
cmp byte [esi + eax + 1], 2
jne 0x409f25
movzx edx, byte [esi + eax + 4]
cmp dx, word [ebp - 0x10]
jne 0x409f25
movzx edx, byte [esi + eax + 6]
cmp dx, word [ebp - 0x14]
jne 0x409f25
mov edx, dword [ebp + 0xc]
cmp dword [ebp + 0x10], edx
je 0x40a000
cmp cl, 4
jne 0x409fbe
cmp byte [esi + eax + 1], 2
jne 0x409fbe
movzx ecx, byte [esi + eax + 4]
cmp cx, word [ebp - 0x10]
jne 0x409fbe
movzx ecx, byte [esi + eax + 6]
cmp cx, word [ebp - 0x14]
jne 0x409fbe
mov ecx, dword [ebp + 0xc]
cmp dword [ebp + 0x10], ecx
jne 0x409fbe
push ebx
push ebx
add esi, 0xa
push esi
push dword [ebp + 8]
mov dword [ebp - 4], 2
call edi
push ebx
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
lea eax, [ebp - 0x18]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
push ebx
add esi, 2
push esi
push dword [ebp + 8]
mov dword [ebp - 0xc], eax
call edi
mov ecx, dword [ebp - 0x18]
mov eax, 0xff
mov dword [ebp - 4], ecx
cmp ecx, eax
jl 0x409f9e
mov dword [ebp - 4], eax
push ebx
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push dword [ebp + 0x18]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp + 0x18]
mov byte [eax + ecx], bl
mov eax, dword [ebp + 0x14]
inc esi
cmp esi, dword [ebp - 8]
jb 0x409ea9
jmp 0x40a029
push ebx
push ebx
add esi, 0xa
push esi
push dword [ebp + 8]
call edi
push 4
pop eax
push ebx
lea ecx, [ebp - 4]
push ecx
push eax
mov dword [ebp - 4], eax
lea eax, [ebp - 0x1c]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
call fcn.004089e8
mov eax, dword [ebp + 0x1c]
fstp qword [eax]
jmp 0x40a026
push ebx
push ebx
add esi, 0xa
push esi
push dword [ebp + 8]
call edi
push 8
pop eax
push ebx
lea ecx, [ebp - 4]
push ecx
push eax
push dword [ebp + 0x1c]
mov dword [ebp - 4], eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 0x14]
push eax
call fcn.00447ab6
mov esi, dword [ebp + 8]
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0xc]
jmp 0x40a041
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0x18