Function at 0x401170
Capabilities:
Print debug messages
Read file on windows
Write file on windows

Disassembly:
sub esp, 0x5f4
mov eax, dword [0x443430]
xor eax, esp
mov dword [esp + 0x5ec], eax
push ebx
push ebp
push esi
xor ebx, ebx
xor esi, esi
cmp dword [str.UnZip.exe], ebx
push edi
je 0x4011a8
add esi, 1
cmp dword [esi*4 + 0x444864], ebx
jne 0x401194
cmp esi, ebx
jl 0x401465
push 0xec
lea eax, [esp + 0x20]
push ebx
push eax
mov dword [esp + 0x24], ebx
call fcn.00420b80
add esp, 0xc
push esi
lea ecx, [esp + 0x1c]
push ecx
call fcn.00401490
test eax, eax
jne 0x4011d8
push str.UnZipExe2
jmp 0x40146a
push 0x103
lea edx, [esp + 0x10d]
push ebx
push edx
mov byte [esp + 0x114], bl
call fcn.00420b80
add esp, 0xc
push 0x3e7
lea eax, [esp + 0x215]
push ebx
push eax
mov dword [esp + 0x1c], ebx
mov byte [esp + 0x21c], bl
call fcn.00420b80
add esp, 0xc
push 0x104
lea ecx, [esp + 0x10c]
push ecx
push ebx
mov dword [esp + 0x20], ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov edi, dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
lea edx, [esp + 0x108]
push edx
call edi
push ebx
push 0x80
push 3
push ebx
push 3
push SysReAllocString
lea eax, [esp + 0x120]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x40126f
push str.CreateFile_open_file_is_failed_in_UnZipArchive
call edi
jmp 0x401470
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 2
push ebx
push ebx
push ebp
call esi
push 2
push ebx
push 0xfffffffffffffff3
push ebp
call esi
push ebx
lea ecx, [esp + 0x14]
push ecx
push 9
lea edx, [esp + 0x21c]
push edx
push ebp
mov dword [esp + 0x24], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, ebx
je 0x4012bc
cmp dword [esp + 0x10], ebx
jne 0x4012cf
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.ReadFile_file_is_end__000_in_UnZipArchive
call edi
jmp 0x401470
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.ReadFile_file_is_failed_000_in_UnZipArchive
call edi
jmp 0x401470
mov edi, str._ZM_QZDM_
lea esi, [esp + 0x210]
mov ecx, 0xa
xor eax, eax
mov byte [esp + 0x219], bl
repe cmpsb byte [esi], byte es:[edi]
je 0x401304
push str.ReadFile_file_is_not_Archive_in_UnZipArchive
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x401470
xor eax, eax
jmp 0x401310
mov cl, byte [eax + 0x447308]
mov byte [esp + eax + 0x108], cl
add eax, 1
test cl, cl
jne 0x401310
lea edi, [esp + 0x108]
add edi, 0xffffffff
mov edi, edi
mov al, byte [edi + 1]
add edi, 1
test al, al
jne 0x401330
mov cx, word [0x43a468]
mov eax, dword [str.UnZip.exe]
mov word [edi], cx
mov esi, eax
jmp 0x401350
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x401350
lea edi, [esp + 0x108]
sub eax, esi
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x401365
mov ecx, eax
shr ecx, 2
push ebx
rep movsd dword es:[edi], dword [esi]
push 0x80
push 2
push ebx
push 3
mov ecx, eax
push 0x40000000
lea edx, [esp + 0x120]
and ecx, 3
push edx
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4013b3
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.UnZipExe3
jmp 0x40146a
push ebx
push ebx
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebx, dword [esp + 0x18]
xor esi, esi
test ebx, ebx
jbe 0x401421
mov eax, ebx
sub eax, esi
cmp eax, 0x3e8
jle 0x4013d7
mov eax, 0x3e8
push 0
lea ecx, [esp + 0x14]
push ecx
push eax
lea edx, [esp + 0x21c]
push edx
push ebp
mov dword [esp + 0x24], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x401452
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40143f
push 0
lea ecx, [esp + 0x18]
push ecx
push eax
lea edx, [esp + 0x21c]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
add esi, dword [esp + 0x10]
cmp esi, ebx
jb 0x4013c7
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebp
call esi
push edi
call esi
push str.UnZipExe4
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, 1
jmp 0x401472
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebp
call esi
push edi
call esi
push str.ReadFile_file_is_end_001_in_UnZipExe
jmp 0x40146a
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebp
call esi
push edi
call esi
push str.ReadFile_file_is_failed_002_in_UnZipExe
jmp 0x40146a
push str.UnZipExe1
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor eax, eax
mov ecx, dword [esp + 0x5fc]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0041f2bf
add esp, 0x5f4
ret