Function at 0x406610
Capabilities:
Check if file exists
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x449420
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x3850
call fcn.004351f0
mov eax, dword [0x4615e0]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov ebx, ecx
mov dword [ebp - 0x382c], ebx
mov esi, edx
mov dword [ebp - 0x384c], esi
xor edi, edi
mov dword [ebp - 0x3824], edi
mov dword [ebp - 0x381c], edi
mov dword [ebp - 0x3820], edi
mov dword [ebp - 0x3828], edi
mov dword [ebp - 0x3844], edi
push 0x800
push edi
lea eax, [ebp - 0x2818]
push eax
call fcn.00431f30
add esp, 0xc
push 0x800
push edi
lea ecx, [ebp - 0x818]
push ecx
call fcn.00431f30
add esp, 0xc
push 0x800
push edi
lea edx, [ebp - 0x1818]
push edx
call fcn.00431f30
add esp, 0xc
push 0x800
push edi
lea eax, [ebp - 0x3818]
push eax
call fcn.00431f30
add esp, 0xc
push 0x800
push edi
lea ecx, [ebp - 0x2018]
push ecx
call fcn.00431f30
add esp, 0xc
push 0x800
push edi
lea edx, [ebp - 0x1018]
push edx
call fcn.00431f30
add esp, 0xc
push 0x800
push edi
lea eax, [ebp - 0x3018]
push eax
call fcn.00431f30
add esp, 0xc
mov dword [ebp - 4], edi
cmp ebx, edi
je 0x406e80
cmp esi, edi
je 0x406e80
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x406721
sub eax, edx
sar eax, 1
je 0x406e80
push esi
push str._r_n__Extract_files_to___s__
mov ecx, 0x466208
call fcn.00405f80
push 0x800
push edi
lea ecx, [ebp - 0x3018]
push ecx
call fcn.00431f30
add esp, 0x14
mov eax, esi
lea ecx, [ebp - 0x3018]
call fcn.00401790
lea eax, [ebp - 0x3018]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x406771
sub eax, edx
sar eax, 1
cmp word [ebp + eax*2 - 0x301a], 0x5c
jne 0x4067ab
lea eax, [ebp - 0x3018]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x406794
sub eax, edx
sar eax, 1
mov word [ebp + eax*2 - 0x301a], di
lea edx, [ebp - 0x3820]
push edx
lea eax, [ebp - 0x381c]
push eax
push str.7ZIP
mov ecx, str.DATALIST
mov edx, ebx
call fcn.00406ec0
mov dword [ebp - 0x3824], eax
lea ecx, [ebp - 0x2818]
call fcn.00407280
lea edx, [ebp - 0x2818]
call fcn.00407dc0
push str.7z.exe
lea ecx, [ebp - 0x2818]
push ecx
push 0x453448
push 0x400
lea edx, [ebp - 0x818]
push edx
call fcn.00431005
add esp, 0x14
lea eax, [ebp - 0x818]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x406827
lea ecx, [ebp - 0x818]
call fcn.00407560
lea ecx, [ebp - 0x818]
push ecx
push str.Create_File___s_
mov ecx, 0x466208
call fcn.00405f80
add esp, 8
push edi
push 0x80
push 2
push edi
push edi
push 0x40000000
lea edx, [ebp - 0x818]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4068b2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [ebp - 0x3824], esi
lea eax, [ebp - 0x818]
push eax
push str.Create_File_Fail_____s_
mov ecx, 0x466208
call fcn.00405f80
add esp, 8
mov eax, dword [ebp - 0x381c]
cmp eax, edi
je 0x40689b
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov dword [ebp - 0x3858], esi
push 0x45b9ec
lea ecx, [ebp - 0x3858]
push ecx
call fcn.0043521b
push edi
lea edx, [ebp - 0x3828]
push edx
mov eax, dword [ebp - 0x3820]
push eax
mov ebx, dword [ebp - 0x381c]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x406e46
cmp ebx, edi
je 0x4068e2
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x381c], edi
mov dword [ebp - 0x3820], edi
mov dword [ebp - 0x3828], edi
lea ecx, [ebp - 0x3820]
push ecx
lea edx, [ebp - 0x381c]
push edx
push str.7ZIPDLL
mov ecx, str.DATALIST
mov edx, dword [ebp - 0x382c]
call fcn.00406ec0
mov dword [ebp - 0x3824], eax
push str.7z.dll
lea eax, [ebp - 0x2818]
push eax
push 0x453448
push 0x400
lea ecx, [ebp - 0x1818]
push ecx
call fcn.00431005
add esp, 0x14
lea edx, [ebp - 0x1818]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x406965
lea ecx, [ebp - 0x1818]
call fcn.00407560
lea eax, [ebp - 0x1818]
push eax
push str.Create_File___s_
mov ecx, 0x466208
call fcn.00405f80
add esp, 8
push edi
push 0x80
push 2
push edi
push edi
push 0x40000000
lea ecx, [ebp - 0x1818]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4069f0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [ebp - 0x3824], esi
lea edx, [ebp - 0x1818]
push edx
push str.Create_File_Fail_____s_
mov ecx, 0x466208
call fcn.00405f80
add esp, 8
mov eax, dword [ebp - 0x381c]
cmp eax, edi
je 0x4069d9
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov dword [ebp - 0x3848], esi
push 0x45b9ec
lea eax, [ebp - 0x3848]
push eax
call fcn.0043521b
push edi
lea ecx, [ebp - 0x3828]
push ecx
mov edx, dword [ebp - 0x3820]
push edx
mov ebx, dword [ebp - 0x381c]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x406e0c
cmp ebx, edi
je 0x406a20
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x381c], edi
mov dword [ebp - 0x3820], edi
mov dword [ebp - 0x3828], edi
lea eax, [ebp - 0x3820]
push eax
lea ecx, [ebp - 0x381c]
push ecx
push str.PACKAGE
mov ecx, str.DATALIST
mov edx, dword [ebp - 0x382c]
call fcn.00406ec0
mov dword [ebp - 0x3824], eax
push str.package.7z
lea edx, [ebp - 0x2818]
push edx
push 0x453448
push 0x400
lea eax, [ebp - 0x2018]
push eax
call fcn.00431005
add esp, 0x14
lea ecx, [ebp - 0x2018]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x406aa3
lea ecx, [ebp - 0x2018]
call fcn.00407560
lea edx, [ebp - 0x2018]
push edx
push str.Create_File___s_
mov ecx, 0x466208
call fcn.00405f80
add esp, 8
push edi
push 0x80
push 2
push edi
push edi
push 0x40000000
lea eax, [ebp - 0x2018]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x406b2e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [ebp - 0x3824], esi
lea ecx, [ebp - 0x2018]
push ecx
push str.Create_File_Fail_____s_
mov ecx, 0x466208
call fcn.00405f80
add esp, 8
mov eax, dword [ebp - 0x381c]
cmp eax, edi
je 0x406b17
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov dword [ebp - 0x3834], esi
push 0x45b9ec
lea edx, [ebp - 0x3834]
push edx
call fcn.0043521b
push edi
lea eax, [ebp - 0x3828]
push eax
mov ecx, dword [ebp - 0x3820]
push ecx
mov ebx, dword [ebp - 0x381c]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x406dd2
cmp ebx, edi
je 0x406b5e
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edx, [ebp - 0x3820]
push edx
lea eax, [ebp - 0x381c]
push eax
push str.SSZIPDLL
mov ecx, str.DATALIST
mov edx, dword [ebp - 0x382c]
call fcn.00406ec0
mov dword [ebp - 0x3824], eax
push str.SS7Zip.dll
lea ecx, [ebp - 0x2818]
push ecx
push 0x453448
push 0x400
lea edx, [ebp - 0x1018]
push edx
call fcn.00431005
add esp, 0x14
lea eax, [ebp - 0x1018]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x406bcf
lea ecx, [ebp - 0x1018]
call fcn.00407560
lea ecx, [ebp - 0x1018]
push ecx
push str.Create_File___s_
mov ecx, 0x466208
call fcn.00405f80
add esp, 8
push edi
push 0x80
push 2
push edi
push edi
push 0x40000000
lea edx, [ebp - 0x1018]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x406c5a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [ebp - 0x3824], esi
lea eax, [ebp - 0x1018]
push eax
push str.Create_File_Fail_____s_
mov ecx, 0x466208
call fcn.00405f80
add esp, 8
mov eax, dword [ebp - 0x381c]
cmp eax, edi
je 0x406c43
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov dword [ebp - 0x383c], esi
push 0x45b9ec
lea ecx, [ebp - 0x383c]
push ecx
call fcn.0043521b
push edi
lea edx, [ebp - 0x3828]
push edx
mov eax, dword [ebp - 0x3820]
push eax
mov ebx, dword [ebp - 0x381c]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x406d98
cmp ebx, edi
je 0x406c8a
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x1018]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, eax
cmp esi, edi
je 0x406cca
push str.SS7Zip_Extract
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, eax
lea edx, [ebp - 0x1018]
push edx
push str.Load___s__DLL_successed___
mov ecx, 0x466208
call fcn.00405f80
jmp 0x406ce6
lea eax, [ebp - 0x1018]
push eax
push str.Load___s__DLL_fail__
mov ecx, 0x466208
call fcn.00405f80
mov ebx, dword [ebp - 0x3844]
add esp, 8
mov ecx, dword [ebp - 0x384c]
push ecx
lea edx, [ebp - 0x2018]
push edx
push str.x__t7z___s___o__s___aoa
push 0x400
lea eax, [ebp - 0x3818]
push eax
call fcn.00431005
add esp, 0x14
lea ecx, [ebp - 0x818]
push ecx
push str.Extract_Command_:___s_
mov ecx, 0x466208
call fcn.00405f80
lea edx, [ebp - 0x3818]
push edx
push str.Extract_Parameter_:___s_
mov ecx, 0x466208
call fcn.00405f80
add esp, 0x10
cmp ebx, edi
je 0x406d59
lea eax, [ebp - 0x3818]
push eax
lea ecx, [ebp - 0x818]
push ecx
call ebx
mov dword [ebp - 0x3824], eax
cmp esi, edi
je 0x406d64
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea ecx, [ebp - 0x2818]
call fcn.00407560
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x3824]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00430ff6
mov esp, ebp
pop ebp
ret
cmp ebx, edi
je 0x406da3
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push str.Fail_to_write_zip_command_file.
mov ecx, 0x466208
call fcn.00405f80
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x3830], eax
push 0x45b9ec
lea edx, [ebp - 0x3830]
push edx
call fcn.0043521b
cmp ebx, edi
je 0x406ddd
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push str.Fail_to_write_compressed_package_file.
mov ecx, 0x466208
call fcn.00405f80
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x3854], eax
push 0x45b9ec
lea eax, [ebp - 0x3854]
push eax
call fcn.0043521b
cmp ebx, edi
je 0x406e17
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push str.Fail_to_write_zip_command_file.
mov ecx, 0x466208
call fcn.00405f80
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x3838], eax
push 0x45b9ec
lea ecx, [ebp - 0x3838]
push ecx
call fcn.0043521b
cmp ebx, edi
je 0x406e51
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push str.Fail_to_write_zip_command_file.
mov ecx, 0x466208
call fcn.00405f80
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x3850], eax
push 0x45b9ec
lea edx, [ebp - 0x3850]
push edx
call fcn.0043521b
mov dword [ebp - 0x3840], 0x57
push 0x45b9ec
lea eax, [ebp - 0x3840]
push eax
call fcn.0043521b
push str.GPF_in_CSelfExtraction::Extract__
mov ecx, 0x466208
call fcn.00405f80
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov eax, 0x406d76
ret