Function at 0x407610
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x134
mov eax, dword [esp + 0x138]
push ebx
push ebp
push esi
mov esi, dword [eax]
push edi
lea edi, [eax + 4]
mov eax, dword [esp + 0x154]
xor ebp, ebp
mov dword [esp + 0x30], esi
cmp eax, ebp
mov dword [esp + 0x20], ebp
mov dword [esp + 0x2c], ebp
je 0x407655
lea eax, [esi*8]
sub eax, esi
shl eax, 2
push eax
push edi
call fcn.00402110
add esp, 8
mov ecx, dword [esp + 0x150]
lea ebx, [esi + ecx]
mov dword [esp + 0x28], ebx
lea edx, [ebx*8]
sub edx, ebx
shl edx, 2
push edx
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
cmp eax, ebp
mov dword [esp + 0x18], eax
jne 0x40768e
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x134
ret
lea ebp, [esi*8]
push 0
sub ebp, esi
mov esi, edi
shl ebp, 2
mov ecx, ebp
mov edi, eax
mov eax, ecx
push 0x80
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push 3
push 0
and ecx, 3
push 0
push 0x40000000
rep movsb byte es:[edi], byte [esi]
push 0x42a7d8
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x14], eax
jne 0x4076ed
push 0
push str.Error
push str.Cant_load_the_previous_pack_file.
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x407a2c
mov ecx, dword [esp + 0x150]
mov dword [esp + 0x24], 0
test ecx, ecx
jle 0x4078de
fild dword [esp + 0x150]
mov ecx, dword [esp + 0x18]
mov ebx, dword [esp + 0x14c]
add ebp, ecx
fstp qword [esp + 0x38]
mov dword [esp + 0x1c], ebp
fild dword [esp + 0x24]
push 0
fmul qword [0x40f258]
fdiv qword [esp + 0x3c]
call sub.MSVCRT.dll__ftol
mov edx, dword [0x42a6d0]
push eax
push 0x402
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
mov edi, 0x432f0c
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x40]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x40]
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 + 4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea eax, [esp + 0x10]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x44]
push ecx
call fcn.00407210
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x40797a
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x18]
push 0x407a50
push 0x1c
push edx
push eax
push ebx
call dword [sym.imp.MSVCRT.dll_bsearch]
mov esi, eax
add esp, 0x14
test esi, esi
je 0x40782e
mov ecx, dword [esi + 0x18]
mov eax, dword [esp + 0x10]
cmp ecx, eax
jl 0x4077f8
mov edx, dword [esi]
mov eax, dword [esp + 0x14]
push 0
push 0
push edx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [esi], eax
jmp 0x407813
mov ecx, dword [esp + 0x14]
push 2
push 0
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [esi], eax
mov dword [esp + 0x2c], 1
cmp dword [esi], 0
jl 0x40799e
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x10]
dec eax
mov dword [esi + 0x18], edx
mov dword [esp + 0x28], eax
jmp 0x40786c
mov eax, dword [esp + 0x1c]
mov ecx, 7
mov esi, ebx
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
push 2
push 0
push 0
push esi
mov dword [eax + 0x18], ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [esp + 0x1c]
test eax, eax
mov dword [edx], eax
jl 0x4079c8
mov eax, edx
add eax, 0x1c
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x154]
test eax, eax
je 0x407885
mov eax, dword [esp + 0x10]
push eax
push ebp
call fcn.00401be0
add esp, 8
mov edx, dword [esp + 0x10]
mov esi, dword [esp + 0x14]
lea ecx, [esp + 0x34]
push 0
push ecx
push edx
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x34]
cmp eax, ecx
jne 0x4079ee
push ebp
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x28]
add esp, 4
mov dword [ebx + 0x18], ecx
mov ecx, dword [esp + 0x150]
inc eax
add ebx, 0x1c
cmp eax, ecx
mov dword [esp + 0x24], eax
jl 0x407720
mov ebx, dword [esp + 0x28]
mov eax, esi
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [esp + 0x18]
push 0x407a50
push 0x1c
push ebx
push edi
call dword [sym.imp.MSVCRT.dll_qsort]
mov eax, dword [esp + 0x164]
add esp, 0x10
test eax, eax
je 0x407a1d
mov ecx, dword [esp + 0x2c]
test ecx, ecx
je 0x407a1d
mov ecx, dword [0x432ef4]
push str.Optimizing_text_files._Please_wait.
push 0x3e9
push ecx
call dword [sym.imp.USER32.dll_SetDlgItemTextA]
lea esi, [ebx*8]
sub esi, ebx
shl esi, 2
push esi
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ecx, esi
mov ebp, eax
mov edx, ecx
mov esi, edi
mov edi, ebp
push ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x20]
push esi
call fcn.004072c0
add esp, 0xc
test eax, eax
je 0x4079fc
mov eax, dword [esp + 0x154]
push eax
push ebx
push esi
jmp 0x407a06
push 0
push str.Error
push str.Error_opening_source_file.
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x407a2c
push 0
push str.Error
push str.Seek_error_on_pack_file.
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebp
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
jmp 0x407a2c
push 0
push str.Error
push str.Seek_error_on_pack_file.
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebp
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
jmp 0x407a2c
push 0
push str.Error
push str.Error_writing_pack_file.
jmp 0x4079d4
mov ecx, dword [esp + 0x154]
push ecx
push ebx
push ebp
call fcn.00407500
add esp, 0xc
mov dword [esp + 0x20], eax
push ebp
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
jmp 0x407a2c
push eax
push ebx
push edi
call fcn.00407500
add esp, 0xc
mov dword [esp + 0x20], eax
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.MSVCRT.dll_free]
mov eax, dword [esp + 0x24]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x134
ret