Function at 0x407a70
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x118
push ebx
mov ebx, dword [esp + 0x120]
push ebp
push esi
mov esi, dword [esp + 0x12c]
push edi
push 0x407a50
push 0x1c
push esi
push ebx
call dword [sym.imp.MSVCRT.dll_qsort]
add esp, 0x10
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push 0x42a7d8
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x407adf
push 0
push str.Error
push str.Cant_create_pack_file.
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x118
ret
test esi, esi
mov dword [esp + 0x14], 0
jle 0x407c1a
fild dword [esp + 0x130]
add ebx, 0x18
fstp qword [esp + 0x1c]
fild dword [esp + 0x14]
push 0
fmul qword [0x40f258]
fdiv qword [esp + 0x20]
call sub.MSVCRT.dll__ftol
push eax
mov eax, dword [0x42a6d0]
push 0x402
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
push 1
push 0
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test eax, eax
mov dword [ebx - 0x18], eax
jl 0x407c61
mov edi, 0x432f0c
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x24]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x24]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebx - 0x14]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x10]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x28]
push ecx
call fcn.00407210
mov esi, eax
add esp, 8
test esi, esi
je 0x407c89
mov eax, dword [esp + 0x134]
test eax, eax
je 0x407bc3
mov edx, dword [esp + 0x10]
push edx
push esi
call fcn.00401be0
add esp, 8
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x18]
push 0
push eax
push ecx
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
cmp edx, eax
jne 0x407c97
push esi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x134]
mov dword [ebx], eax
mov eax, dword [esp + 0x18]
add esp, 4
inc eax
add ebx, 0x1c
cmp eax, ecx
mov dword [esp + 0x14], eax
jl 0x407afd
mov ebx, dword [esp + 0x12c]
mov esi, ecx
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [esp + 0x134]
push edi
push esi
push ebx
call fcn.00407500
add esp, 0xc
test eax, eax
je 0x407c7c
test edi, edi
je 0x407c51
lea ecx, [esi*8]
sub ecx, esi
shl ecx, 2
push ecx
push ebx
call fcn.00402110
add esp, 8
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x118
ret
push 0
push str.Error
push str.Seek_error_on_pack_file.
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x118
ret
push 0
push str.Error
push str.Error_opening_source_file.
jmp 0x407c6d
push 0
push str.Error
push str.Error_writing_pack_file.
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x118
ret