Function at 0x407a80
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5f589c
mov eax, dword fs:[0]
push eax
sub esp, 0x198
mov eax, dword [0x67b374]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
lea ecx, [ebp - 0x174]
call fcn.00406c60
push 0
push 0x80
push 3
push 0
mov dword [ebp - 4], 0
lea eax, [ebp - 0x174]
cmp dword [ebp - 0x160], 0x10
push 1
cmovae eax, dword [ebp - 0x174]
push SysReAllocStringLen
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x407ea2
lea eax, [ebp - 0x1a4]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x407e9b
mov eax, dword [ebp - 0x1a4]
push 0
push 0
add eax, 0xfffff000
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0x1000
call fcn.005d1932
add esp, 4
mov dword [ebp - 0x194], eax
test eax, eax
je 0x407e9b
push 0
lea ecx, [ebp - 0x198]
mov dword [ebp - 0x198], 0
push ecx
push 0x1000
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x407e8d
mov edi, dword [ebp - 0x194]
add edi, 0xffa
cmp dword [edi], 0x5845545f
jne 0x407e8d
cmp word [edi + 4], 0x5f54
jne 0x407e8d
mov cl, byte [edi]
xor eax, eax
test cl, cl
je 0x407e8d
nop word [eax + eax]
cmp cl, 0x40
jne 0x407bae
inc eax
cmp eax, 1
jne 0x407bbb
mov byte [edi], 0
mov cl, byte [edi - 1]
dec edi
test cl, cl
jne 0x407ba0
jmp 0x407e8d
cmp eax, 2
jne 0x407e8d
push 0x104
lea eax, [ebp - 0x114]
push 0
push eax
call fcn.005c7c50
lea eax, [edi + 1]
push eax
lea eax, [ebp - 0x114]
push 0x104
push eax
call fcn.005d0344
lea eax, [ebp - 0x114]
push eax
call fcn.005d1a72
add esp, 0x1c
mov dword [ebp - 0x190], eax
sub edi, eax
je 0x407e8d
cmp dword [esi + 0x4cc], 8
lea edx, [esi + 0x4b8]
jb 0x407c1a
mov edx, dword [edx]
lea ecx, [ebp - 0x144]
call fcn.004061e0
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x130]
mov eax, edx
mov ecx, dword [ebp - 0x134]
sub eax, ecx
push 0xc
push str.install.dat
cmp eax, 0xc
jb 0x407c6f
cmp edx, 0x10
lea esi, [ebp - 0x144]
lea eax, [ecx + 0xc]
cmovae esi, dword [ebp - 0x144]
add esi, ecx
mov dword [ebp - 0x134], eax
push esi
call fcn.005c76d0
add esp, 0xc
mov byte [esi + 0xc], 0
jmp 0x407c89
mov byte [ebp - 0x19c], 0
lea ecx, [ebp - 0x144]
push dword [ebp - 0x19c]
push 0xc
call fcn.00404360
cmp dword [ebp - 0x130], 0x10
lea eax, [ebp - 0x144]
push 0x663dd4
cmovae eax, dword [ebp - 0x144]
push eax
call fcn.005d1c12
mov esi, eax
add esp, 8
test esi, esi
je 0x407e53
mov dword [ebp - 0x14c], 0
mov dword [ebp - 0x148], 0xf
mov byte [ebp - 0x15c], 0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x15c]
push dword [ebp - 0x190]
push edi
call fcn.004053a0
xor eax, eax
mov dword [ebp - 0x11c], 0
mov dword [ebp - 0x118], 7
mov word [ebp - 0x12c], ax
mov byte [ebp - 4], 3
lea edx, [ebp - 0x15c]
cmp dword [ebp - 0x148], 0x10
lea ecx, [ebp - 0x18c]
cmovae edx, dword [ebp - 0x15c]
call fcn.004060f0
push eax
lea ecx, [ebp - 0x12c]
call fcn.00405ab0
mov edx, dword [ebp - 0x178]
cmp edx, 8
jb 0x407d72
mov ecx, dword [ebp - 0x18c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x407d68
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x407ef4
push edx
push ecx
call fcn.00450cc8
add esp, 8
push esi
push 1
lea eax, [ebp - 0x190]
mov dword [ebp - 0x190], 0xfeff
push 2
push eax
call fcn.005cbf65
cmp dword [ebp - 0x118], 8
lea ecx, [ebp - 0x12c]
mov eax, dword [ebp - 0x11c]
cmovae ecx, dword [ebp - 0x12c]
add eax, eax
push esi
push 1
push eax
push ecx
call fcn.005cbf65
push esi
call fcn.005cc4ec
mov edx, dword [ebp - 0x118]
add esp, 0x24
cmp edx, 8
jb 0x407dfc
mov ecx, dword [ebp - 0x12c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x407df2
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x407ef9
push edx
push ecx
call fcn.00450cc8
add esp, 8
mov edx, dword [ebp - 0x148]
xor eax, eax
mov dword [ebp - 0x11c], 0
mov dword [ebp - 0x118], 7
mov word [ebp - 0x12c], ax
cmp edx, 0x10
jb 0x407e53
mov ecx, dword [ebp - 0x15c]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x407e49
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x407efe
push edx
push ecx
call fcn.00450cc8
add esp, 8
mov edx, dword [ebp - 0x130]
cmp edx, 0x10
jb 0x407e8d
mov ecx, dword [ebp - 0x144]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x407e83
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x407f03
push edx
push ecx
call fcn.00450cc8
add esp, 8
push dword [ebp - 0x194]
call fcn.005cc566
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x160]
cmp edx, 0x10
jb 0x407ed8
mov ecx, dword [ebp - 0x174]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x407ece
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x407f08
push edx
push ecx
call fcn.00450cc8
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00450cb7
mov esp, ebp
pop ebp
ret
call fcn.005cb4ad
call fcn.005cb4ad
call fcn.005cb4ad
call fcn.005cb4ad
call fcn.005cb4ad
int3