Function at 0x4098d0
Capabilities:
Create directory
Create pipe
Create thread
Get file size
Read file on windows
Set current directory
Write file on windows
Write pipe

Disassembly:
mov eax, 0x3138
call fcn.0040a4e0
mov eax, dword [0x413030]
xor eax, dword [esp + 0x3138]
push 0x104
lea ecx, [esp + 0x154]
mov dword [esp + 0x3138], eax
mov eax, dword [esp + 0x3140]
push ecx
push eax
mov dword [0x4133c8], eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edx, [esp + 0x150]
push 0x2f
push edx
call fcn.0040a6f0
add esp, 8
test eax, eax
jne 0x409940
lea eax, [esp + 0x150]
push 0x5c
push eax
call fcn.0040a6f0
add esp, 8
test eax, eax
jne 0x409940
lea eax, [esp + 0x150]
push ebp
push esi
push edi
mov edi, eax
mov ecx, 5
mov esi, str.ziptest_temp_files
rep movsd dword es:[edi], dword [esi]
push 0
lea ecx, [esp + 0x160]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea edx, [esp + 0x15c]
push edx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov ebp, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push str.ziptest_source.dat
call ebp
mov esi, eax
test esi, esi
jne 0x4099ab
push eax
push str.Error
push str.Unable_to_create_temporary_source_file
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x40a081
xor eax, eax
lea ecx, [ecx]
mov cl, al
and cl, 0x7f
mov byte [esp + eax + 0x260], cl
inc eax
cmp eax, 0x3e8
jl 0x4099b0
push 0
lea edx, [esp + 0x1c]
push edx
push 0x3e8
lea eax, [esp + 0x26c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push 0
push str.Ziptest
push str.Testing_zipfile_creation...
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push 2
push 0
push str.ziptest_tofile.zip
call fcn.00408430
push 2
push 0
push str.ziptest_source.dat
mov edi, eax
push str.tof_1.dat
push edi
call fcn.004095a0
push edi
call fcn.00403640
add esp, 0x24
test al, al
push edi
je 0x409a35
call fcn.004056c0
jmp 0x409a3a
call fcn.00409650
add esp, 4
push ebx
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push str.ziptest_tofilehandle.zip
call ebp
push 1
mov ebx, eax
push 0
push ebx
call fcn.00408430
add esp, 0xc
push ebx
mov edi, eax
call esi
push 2
push 0
push str.ziptest_source.dat
push str.tofh_1.dat
push edi
call fcn.004095a0
push edi
call fcn.00403640
add esp, 0x18
test al, al
push edi
je 0x409a94
call fcn.004056c0
jmp 0x409a99
call fcn.00409650
add esp, 4
push 3
push 0x186a0
push 0
call fcn.00408430
push 2
push 0
push str.ziptest_source.dat
mov edi, eax
push str.tom_1.dat
push edi
call fcn.004095a0
lea ecx, [esp + 0x40]
push ecx
lea edx, [esp + 0x4c]
push edx
push edi
call fcn.004095f0
add esp, 0x2c
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push str.ziptest_topagemem.zip
call ebp
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x28]
push 0
mov ebx, eax
lea eax, [esp + 0x20]
push eax
push ecx
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
call esi
push edi
call fcn.00403640
add esp, 4
test al, al
push edi
je 0x409b1e
call fcn.004056c0
jmp 0x409b23
call fcn.00409650
add esp, 4
push 3
lea eax, [esp + 0xa38]
push 0x2710
push eax
call fcn.00408430
push 2
push 0
push str.ziptest_source.dat
mov edi, eax
push str.tom_1.dat
push edi
call fcn.004095a0
lea ecx, [esp + 0x40]
push ecx
push 0
push edi
call fcn.004095f0
add esp, 0x2c
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push str.ziptest_tomem.zip
call ebp
push 0
mov ebx, eax
mov eax, dword [esp + 0x24]
lea edx, [esp + 0x20]
push edx
push eax
lea ecx, [esp + 0xa40]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
call esi
push edi
call fcn.00403640
add esp, 4
test al, al
push edi
je 0x409bae
call fcn.004056c0
jmp 0x409bb3
call fcn.00409650
add esp, 4
push 0
push 0
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_CreatePipe]
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x24]
push ecx
push 0
push edx
push 0x409730
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
push 1
mov edi, eax
mov eax, dword [esp + 0x18]
push 0
push eax
call fcn.00408430
push 2
push 0
push str.ziptest_source.dat
mov ebx, eax
push str.toph_1.dat
push ebx
call fcn.004095a0
push ebx
call fcn.00403640
add esp, 0x24
test al, al
push ebx
je 0x409c20
call fcn.004056c0
jmp 0x409c25
call fcn.00409650
mov ecx, dword [esp + 0x18]
add esp, 4
push ecx
call esi
push 0xffffffffffffffff
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push edi
call esi
mov edx, dword [esp + 0x10]
push edx
call esi
push 2
push 0
push str.ziptest_fromstuff.zip
call fcn.00408430
push 4
push 0
push 0
mov edi, eax
push str.subfolder
push edi
call fcn.004095a0
push 2
push 0
push str.ziptest_source.dat
push str.subfolder_from_file.dat
push edi
call fcn.004095a0
push 2
push 0
push str.ziptest_source.dat
push str.otherfolder_from_file.dat
push edi
call fcn.004095a0
add esp, 0x48
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push str.ziptest_source.dat
call ebp
push 1
push 0
mov ebx, eax
push ebx
push str.from_file_handle.dat
push edi
call fcn.004095a0
add esp, 0x14
push ebx
call esi
xor eax, eax
mov edi, edi
mov cl, al
and cl, 0x7f
mov byte [esp + eax + 0x64c], cl
inc eax
cmp eax, 0x3e8
jl 0x409cc0
push 3
push 0x3e8
lea edx, [esp + 0x654]
push edx
push str.from_mem.dat
push edi
call fcn.004095a0
add esp, 0x14
push 0
push 0
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_CreatePipe]
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x24]
push edx
push 0
push eax
push 0x4096b0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ecx, dword [esp + 0x10]
push 1
push 0
push ecx
push str.from_pipe.dat
push edi
mov ebx, eax
call fcn.004095a0
add esp, 0x14
push 0xffffffffffffffff
push ebx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push ebx
call esi
mov edx, dword [esp + 0x10]
push edx
call esi
push edi
call fcn.00403640
add esp, 4
test al, al
push edi
je 0x409d61
call fcn.004056c0
jmp 0x409d66
call fcn.00409650
add esp, 4
push 0
push str.Ziptest
push str.Testing_zipfile_reading...
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push 2
push 0
push str.ziptest_fromstuff.zip
call fcn.00405600
mov ebx, eax
lea eax, [esp + 0x40]
push eax
push 0xffffffffffffffff
push ebx
call fcn.004035b0
mov eax, dword [esp + 0x4c]
add esp, 0x18
xor edi, edi
test eax, eax
mov dword [esp + 0x18], eax
jle 0x409dd8
jmp 0x409db0
lea ecx, [esp + 0x34]
push ecx
push edi
push ebx
call fcn.004035b0
push 2
push 0
lea edx, [esp + 0x4c]
push edx
push edi
push ebx
call fcn.00405670
mov eax, dword [esp + 0x38]
add esp, 0x20
inc edi
cmp edi, eax
jl 0x409db0
push ebx
call fcn.00403640
add esp, 4
test al, al
push ebx
je 0x409ded
call fcn.004056c0
jmp 0x409df2
call fcn.00409650
add esp, 4
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push str.ziptest_fromstuff.zip
call ebp
push 1
push 0
push eax
call fcn.00405600
push 2
push 0
push str.unztest_fromhandle.dat
mov edi, eax
push 1
push edi
call fcn.00405670
push edi
call fcn.00403640
add esp, 0x24
test al, al
push edi
je 0x409e3d
call fcn.004056c0
jmp 0x409e42
call fcn.00409650
add esp, 4
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push str.ziptest_fromstuff.zip
call ebp
mov edi, eax
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
push ebx
call fcn.0040a153
add esp, 4
push 0
lea ecx, [esp + 0x34]
push ecx
push ebx
push eax
push edi
mov dword [esp + 0x2c], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
call esi
push 3
push ebx
mov ebx, dword [esp + 0x20]
push ebx
call fcn.00405600
push 2
push 0
push str.unztest_frommemory.dat
mov edi, eax
push 1
push edi
call fcn.00405670
push edi
call fcn.00403640
add esp, 0x24
test al, al
push edi
je 0x409ebd
call fcn.004056c0
jmp 0x409ec2
call fcn.00409650
add esp, 4
push ebx
call fcn.0040a161
push 2
push 0
push str.ziptest_fromstuff.zip
call fcn.00405600
mov edi, eax
lea edx, [esp + 0x44]
push edx
lea eax, [esp + 0x40]
push eax
push 0
push str.from_mem.dat
push edi
call fcn.004035f0
mov ecx, dword [esp + 0x50]
push 2
push 0
push str.unztest_found.dat
push ecx
push edi
call fcn.00405670
push 2
push 0
push str.unztest_tofilename.dat
push 1
push edi
call fcn.00405670
add esp, 0x4c
lea edx, [esp + 0x34]
push edx
push 1
push edi
call fcn.004035b0
mov eax, dword [esp + 0x148]
add esp, 0xc
test al, 0x10
jne 0x409f7e
push 0
push eax
push 2
push 0
push 0
push 0x40000000
push str.unztest_tofilehandle
call ebp
push 1
push 0
mov ebx, eax
push ebx
push 1
push edi
call fcn.00405670
add esp, 0x14
lea eax, [esp + 0x150]
push eax
lea ecx, [esp + 0x144]
push ecx
lea edx, [esp + 0x150]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push ebx
call esi
lea eax, [esp + 0x34]
push eax
push 1
push edi
call fcn.004035b0
mov ecx, dword [esp + 0x168]
push ecx
call fcn.0040a153
mov edx, dword [esp + 0x16c]
push 3
push edx
mov ebx, eax
push ebx
push 1
push edi
call fcn.00405670
add esp, 0x24
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push str.unztest_tomem
call ebp
mov ecx, dword [esp + 0x15c]
push 0
mov ebp, eax
lea eax, [esp + 0x20]
push eax
push ecx
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebp
call esi
push ebx
call fcn.0040a161
add esp, 4
push 0
push 0
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_CreatePipe]
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x24]
push ecx
push 0
push edx
push 0x409800
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
push 1
mov ebx, eax
mov eax, dword [esp + 0x18]
push 0
push eax
push 1
push edi
call fcn.00405670
mov ecx, dword [esp + 0x28]
add esp, 0x14
push ecx
call esi
push 0xffffffffffffffff
push ebx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push ebx
call esi
mov edx, dword [esp + 0x10]
push edx
call esi
push edi
call fcn.00403640
add esp, 4
pop ebx
push edi
test al, al
je 0x40a063
call fcn.004056c0
jmp 0x40a068
call fcn.00409650
add esp, 4
push 0
push str.Ziptest
push str.Finished_tests.
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
mov ecx, dword [esp + 0x3140]
xor ecx, dword [esp + 0x3144]
pop edi
pop esi
pop ebp
call fcn.0040a21b
add esp, 0x3138
ret 0x10