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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5f502c
mov eax, dword fs:[0]
push eax
sub esp, 0x198
mov eax, dword [0x67a374]
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.004068a0
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 0x407a92
lea eax, [ebp - 0x1a4]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x407a8b
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.005d1122
add esp, 4
mov dword [ebp - 0x194], eax
test eax, eax
je 0x407a8b
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 0x407a7d
mov edi, dword [ebp - 0x194]
add edi, 0xffa
cmp dword [edi], 0x5845545f
jne 0x407a7d
cmp word [edi + 4], 0x5f54
jne 0x407a7d
mov cl, byte [edi]
xor eax, eax
test cl, cl
je 0x407a7d
nop word [eax + eax]
cmp cl, 0x40
jne 0x40779e
inc eax
cmp eax, 1
jne 0x4077ab
mov byte [edi], 0
mov cl, byte [edi - 1]
dec edi
test cl, cl
jne 0x407790
jmp 0x407a7d
cmp eax, 2
jne 0x407a7d
push 0x104
lea eax, [ebp - 0x114]
push 0
push eax
call fcn.005c7440
lea eax, [edi + 1]
push eax
lea eax, [ebp - 0x114]
push 0x104
push eax
call fcn.005cfb34
lea eax, [ebp - 0x114]
push eax
call fcn.005d1262
add esp, 0x1c
mov dword [ebp - 0x190], eax
sub edi, eax
je 0x407a7d
cmp dword [esi + 0x4cc], 8
lea edx, [esi + 0x4b8]
jb 0x40780a
mov edx, dword [edx]
lea ecx, [ebp - 0x144]
call fcn.00405e20
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 0x40785f
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.005c6ec0
add esp, 0xc
mov byte [esi + 0xc], 0
jmp 0x407879
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 0x662da8
cmovae eax, dword [ebp - 0x144]
push eax
call fcn.005d1402
mov esi, eax
add esp, 8
test esi, esi
je 0x407a43
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.00405d30
push eax
lea ecx, [ebp - 0x12c]
call fcn.00405840
mov edx, dword [ebp - 0x178]
cmp edx, 8
jb 0x407962
mov ecx, dword [ebp - 0x18c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x407958
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x407ae4
push edx
push ecx
call fcn.004503b4
add esp, 8
push esi
push 1
lea eax, [ebp - 0x190]
mov dword [ebp - 0x190], 0xfeff
push 2
push eax
call fcn.005cb755
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.005cb755
push esi
call fcn.005cbcdc
mov edx, dword [ebp - 0x118]
add esp, 0x24
cmp edx, 8
jb 0x4079ec
mov ecx, dword [ebp - 0x12c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4079e2
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x407ae9
push edx
push ecx
call fcn.004503b4
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 0x407a43
mov ecx, dword [ebp - 0x15c]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x407a39
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x407aee
push edx
push ecx
call fcn.004503b4
add esp, 8
mov edx, dword [ebp - 0x130]
cmp edx, 0x10
jb 0x407a7d
mov ecx, dword [ebp - 0x144]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x407a73
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x407af3
push edx
push ecx
call fcn.004503b4
add esp, 8
push dword [ebp - 0x194]
call fcn.005cbd56
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x160]
cmp edx, 0x10
jb 0x407ac8
mov ecx, dword [ebp - 0x174]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x407abe
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x407af8
push edx
push ecx
call fcn.004503b4
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.004503a3
mov esp, ebp
pop ebp
ret
call fcn.005cac9d
call fcn.005cac9d
call fcn.005cac9d
call fcn.005cac9d
call fcn.005cac9d
int3