Function at 0x407380
Capabilities:
Set file attributes
Write file on windows

Disassembly:
sub esp, 0x138
mov eax, dword [esp + 0x13c]
push ebp
push esi
push edi
mov esi, dword [eax]
lea edi, [eax + 4]
mov eax, dword [esp + 0x154]
xor ebp, ebp
cmp eax, ebp
mov dword [esp + 0x28], ebp
mov dword [esp + 0x18], ebp
mov dword [esp + 0x34], esi
je 0x4073c4
lea eax, [esi*8]
sub eax, esi
shl eax, 2
push eax
push edi
call fcn.00402ab0
add esp, 8
mov ecx, dword [esp + 0x150]
lea eax, [esi + ecx]
mov dword [esp + 0x14], eax
lea edx, [eax*8]
sub edx, eax
shl edx, 2
push edx
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
cmp eax, ebp
mov dword [esp + 0x24], eax
jne 0x4073fc
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x138
ret
push ebx
lea ebx, [esi*8]
sub ebx, esi
mov esi, edi
shl ebx, 2
mov ecx, ebx
mov edi, eax
mov eax, ecx
push 0x80
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push 0x425d70
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push ebp
push 0x80
push 3
push ebp
push ebp
push 0x40000000
push 0x425d70
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x407467
push 0
push str.Error
push str.Cant_load_the_previous_pack_file.
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x4077e0
mov eax, dword [esp + 0x154]
mov dword [esp + 0x30], 0
test eax, eax
jle 0x407712
fild dword [esp + 0x154]
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x150]
add ebx, edx
mov dword [esp + 0x20], ecx
fstp qword [esp + 0x3c]
mov dword [esp + 0x24], ebx
fild dword [esp + 0x30]
push 0
fmul qword [0x410978]
fdiv qword [esp + 0x40]
call sub.MSVCRT.dll__ftol
push eax
mov eax, dword [0x425a38]
push 0x402
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
mov edi, 0x42e684
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x44]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov ebx, dword [esp + 0x20]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x44]
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 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 + 0x14]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x48]
push ecx
call fcn.00406f70
mov edi, eax
mov eax, dword [esp + 0x160]
add esp, 8
mov dword [esp + 0x20], edi
test eax, eax
mov byte [esp + 0x13], 0
je 0x407567
mov ecx, dword [esp + 0x14]
mov eax, 4
cmp ecx, eax
jbe 0x407567
cmp dword [edi], 0x1020304
jne 0x407567
mov ecx, dword [esp + 0x14]
mov byte [esp + 0x13], 1
sub ecx, eax
mov dword [esp + 0x14], ecx
test edi, edi
jne 0x407574
dec dword [esp + 0x18]
jmp 0x407677
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x28]
push 0x407800
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 0x4075e4
mov ecx, dword [esi + 0x18]
mov eax, dword [esp + 0x14]
cmp ecx, eax
jl 0x4075b2
mov edx, dword [esi]
push 0
push 0
push edx
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [esi], eax
jmp 0x4075c9
push 2
push 0
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [esi], eax
mov dword [esp + 0x1c], 1
cmp dword [esi], 0
jl 0x4076ae
mov eax, dword [esp + 0x14]
mov dword [esi + 0x18], eax
mov eax, dword [esp + 0x18]
dec eax
mov dword [esp + 0x18], eax
jmp 0x407622
mov eax, dword [esp + 0x24]
mov ecx, 7
mov esi, ebx
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x14]
push 2
push 0
push 0
push ebp
mov dword [eax + 0x18], ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [esp + 0x24]
test eax, eax
mov dword [edx], eax
jl 0x4076d7
mov edi, dword [esp + 0x20]
mov eax, edx
add eax, 0x1c
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x158]
test eax, eax
mov al, byte [esp + 0x13]
je 0x407698
test al, al
jne 0x40769c
mov eax, dword [esp + 0x14]
push eax
push edi
call fcn.00402580
add esp, 8
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x34]
push 0
push ecx
push edx
push edi
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x34]
cmp eax, ecx
jne 0x407704
push edi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
mov ecx, dword [esp + 0x18]
add esp, 4
mov dword [ebx + 0x18], ecx
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x154]
inc eax
add ebx, 0x1c
cmp eax, ecx
mov dword [esp + 0x30], eax
mov dword [esp + 0x20], ebx
jl 0x40749e
jmp 0x407712
test al, al
je 0x407643
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x34]
push 0
push ecx
lea eax, [edi + 4]
push edx
push eax
jmp 0x407650
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]
push edi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
jmp 0x4077e0
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]
mov edx, dword [esp + 0x20]
push edx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
jmp 0x4077e0
push 0
push str.Error
push str.Error_writing_pack_file.
jmp 0x4076ba
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x28]
push 0x407800
push 0x1c
push ebx
push ebp
call dword [sym.imp.MSVCRT.dll_qsort]
mov eax, dword [esp + 0x168]
add esp, 0x10
test eax, eax
je 0x4077d1
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x4077d1
mov eax, dword [0x42e48c]
push str.Optimizing_text_files._Please_wait.
push 0x3e9
push eax
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 esi, ebp
mov edx, ecx
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebx
and ecx, 3
push ebp
rep movsb byte es:[edi], byte [esi]
mov dword [esp + 0x28], eax
call fcn.00407030
add esp, 0xc
test eax, eax
je 0x4077a8
mov eax, dword [esp + 0x158]
push eax
push ebx
push ebp
jmp 0x4077b6
mov ecx, dword [esp + 0x158]
mov edx, dword [esp + 0x1c]
push ecx
push ebx
push edx
call fcn.00407270
add esp, 0xc
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x1c]
push eax
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
jmp 0x4077e0
push eax
push ebx
push ebp
call fcn.00407270
add esp, 0xc
mov dword [esp + 0x2c], eax
mov ecx, dword [esp + 0x28]
push ecx
call dword [sym.imp.MSVCRT.dll_free]
mov eax, dword [esp + 0x30]
add esp, 4
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x138
ret