Function at 0x4079f0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x80c
push ebx
push ebp
push esi
push edi
push 0
mov esi, ecx
push 0x80
push 3
push 0
push 0
lea eax, [esi + 4]
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x407a2e
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x80c
ret 0x10
mov ecx, dword [esp + 0x82c]
mov edi, dword [esp + 0x828]
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esi + 0x12c]
mov ecx, dword [esi + 0x128]
test eax, eax
jl 0x407a8a
jg 0x407a66
cmp ecx, 0x7fffffff
jbe 0x407a8a
mov esi, dword [esi + 0x128]
lea edx, [esp + 0x10]
push 0
mov ecx, eax
push edx
push esi
sar ecx, 0x1f
push ebp
mov dword [esp + 0x20], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [esp + 0x14], eax
jmp 0x407a9c
mov eax, dword [esi + 0x128]
push 0
push 0
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebx, dword [esp + 0x820]
mov dword [esp + 0x10], 0
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea ecx, [esp + 0x14]
push 0
push ecx
lea edx, [esp + 0x20]
push 2
push edx
push ebp
call esi
cmp dword [esp + 0x14], 2
jne 0x407cc9
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0x1c]
push eax
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x18]
and ecx, 0xffff
push eax
lea edx, [esp + 0x24]
push ecx
push edx
push ebp
call esi
lea eax, [esp + 0x1c]
push 0
push eax
call fcn.004032c0
mov al, byte [esp + 0x24]
add esp, 8
cmp al, 0x5b
jne 0x407b5e
lea ecx, [esp + 0x41c]
push 0x400
push ecx
push 0x5d
lea edx, [esp + 0x29]
push 0
push edx
call fcn.00402750
add esp, 0x14
lea esi, [esp + 0x41c]
mov eax, ebx
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x407b55
test cl, cl
je 0x407b51
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x407b55
add eax, 2
add esi, 2
test cl, cl
jne 0x407b31
xor eax, eax
jmp 0x407b5a
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x407b72
mov eax, dword [esp + 0x10]
inc eax
cmp eax, 0x2710
mov dword [esp + 0x10], eax
jl 0x407aab
mov ebx, dword [esp + 0x824]
mov dword [esp + 0x10], 0
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [esp + 0x14]
push 0
push eax
lea ecx, [esp + 0x20]
push 2
push ecx
push ebp
call esi
cmp dword [esp + 0x14], 2
jne 0x407cc9
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0x1c]
push eax
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x1c]
lea edx, [esp + 0x18]
and eax, 0xffff
push edx
lea ecx, [esp + 0x24]
push eax
push ecx
push ebp
call esi
lea edx, [esp + 0x1c]
push 0
push edx
call fcn.004032c0
mov al, byte [esp + 0x24]
add esp, 8
cmp al, 0x5b
je 0x407cc9
lea eax, [esp + 0x41c]
push 0x400
push eax
push 0x3d
lea ecx, [esp + 0x28]
push 0
push ecx
call fcn.00402750
lea edx, [esp + 0x430]
push 0
push edx
call fcn.004032c0
add esp, 0x1c
lea esi, [esp + 0x41c]
mov eax, ebx
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x407c3d
test cl, cl
je 0x407c39
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x407c3d
add eax, 2
add esi, 2
test cl, cl
jne 0x407c19
xor eax, eax
jmp 0x407c42
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x407c5a
mov eax, dword [esp + 0x10]
inc eax
cmp eax, 0x2710
mov dword [esp + 0x10], eax
jl 0x407b81
lea eax, [esp + 0x41c]
push 0x400
push eax
push 0x3d
lea ecx, [esp + 0x28]
push 1
push ecx
call fcn.00402750
lea edx, [esp + 0x430]
push 0
push edx
call fcn.004032c0
lea edi, [esp + 0x438]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x1c
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push ebp
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x82c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x80c
ret 0x10
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x80c
ret 0x10