Function at 0x40ecd0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x274
mov eax, dword [0x42c004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov ebx, edx
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x26c], ebx
call fcn.0040e9d0
mov ecx, eax
mov dword [ebp - 0x268], ecx
test ecx, ecx
jne 0x40ed23
push str.ERROR:_Invalid_archive_n
call fcn.004035a0
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041c84a
mov esp, ebp
pop ebp
ret
mov eax, dword [ecx]
mov dword [0x42ca80], 0
test eax, eax
je 0x40ef99
push 0
push ebx
push eax
call dword [sym.imp.zip.dll_zip_name_locate]
mov esi, eax
add esp, 0xc
test esi, esi
jns 0x40ed6c
push ebx
push str.ERROR:_zip_name_locate:__s_n
call fcn.004035a0
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041c84a
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x258]
push eax
call dword [sym.imp.zip.dll_zip_stat_init]
add esp, 4
lea ecx, [ebp - 0x258]
mov eax, esi
cdq
mov esi, edx
mov dword [ebp - 0x260], eax
push ecx
push 0
push esi
push eax
mov eax, dword [ebp - 0x268]
push dword [eax]
call dword [sym.imp.zip.dll_zip_stat_index]
add esp, 0x14
test eax, eax
je 0x40edc9
push ebx
push str.ERROR:_zip_stat_index:__s_n
call fcn.004035a0
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041c84a
mov esp, ebp
pop ebp
ret
push 0x100000
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
mov dword [ebp - 0x25c], eax
test eax, eax
jne 0x40ee02
push str.ERROR:_Unable_to_allocate_memory_n
call fcn.004035a0
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041c84a
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x268]
push 0
push esi
push dword [ebp - 0x260]
push dword [eax]
call dword [sym.imp.zip.dll_zip_fopen_index]
mov esi, eax
add esp, 0x10
mov dword [ebp - 0x260], esi
test esi, esi
jne 0x40ee4a
push ebx
push str.ERROR:_zip_fopen_index:__s_n
call fcn.004035a0
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041c84a
mov esp, ebp
pop ebp
ret
push 0x41ea64
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
add esp, 8
mov dword [ebp - 0x274], eax
test eax, eax
jne 0x40ee8c
push edi
push str.ERROR:_Unable_to_open_output_file:__s_n
call fcn.004035a0
push esi
call dword [sym.imp.zip.dll_zip_fclose]
add esp, 0xc
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041c84a
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x23c]
mov ecx, 0x100000
mov esi, dword [ebp - 0x240]
mov dword [ebp - 0x264], ecx
mov dword [ebp - 0x270], eax
test eax, eax
jne 0x40eeb5
test esi, esi
je 0x40ef3b
cmp dword [0x42ca80], 0
jne 0x40ef3b
test eax, eax
ja 0x40eed4
jb 0x40eecc
cmp esi, 0x100000
jae 0x40eed4
mov ecx, esi
mov dword [ebp - 0x264], ecx
mov eax, ecx
cdq
push edx
push eax
push dword [ebp - 0x25c]
push dword [ebp - 0x260]
call dword [sym.imp.zip.dll_zip_fread]
mov ebx, eax
add esp, 0x10
test ebx, ebx
js 0x40ef81
push dword [ebp - 0x274]
push ebx
push 1
push dword [ebp - 0x25c]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp eax, ebx
jne 0x40ef6e
mov ecx, dword [ebp - 0x264]
mov eax, ebx
cdq
sub esi, eax
mov eax, dword [ebp - 0x270]
sbb eax, edx
mov dword [ebp - 0x270], eax
test eax, eax
ja 0x40eeb5
jb 0x40ef3b
test esi, esi
jne 0x40eeb5
xor edi, edi
push dword [ebp - 0x25c]
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call esi
add esp, 4
push dword [ebp - 0x274]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
push dword [ebp - 0x260]
call dword [sym.imp.zip.dll_zip_fclose]
jmp 0x40f1df
push edi
push str.ERROR:_frite:__s_n
call fcn.004035a0
add esp, 8
or edi, 0xffffffff
jmp 0x40ef3d
push dword [ebp - 0x26c]
push str.ERROR:_zip_fread:__s_n
call fcn.004035a0
add esp, 8
or edi, 0xffffffff
jmp 0x40ef3d
mov ecx, dword [ecx + 4]
mov edx, ebx
call fcn.0040e940
mov esi, dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
lea ecx, [ebp - 0x218]
push 0
push ecx
push 0x105
push eax
mov dword [ebp - 0x26c], eax
call esi
push 0
lea eax, [ebp - 0x110]
mov byte [ebp - 0x110], 0
push eax
push 0x105
push edi
call esi
lea ecx, [ebp - 0x110]
lea eax, [ebp - 0x218]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40f004
test dl, dl
je 0x40f000
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40f004
add eax, 2
add ecx, 2
test dl, dl
jne 0x40efe4
xor eax, eax
jmp 0x40f009
sbb eax, eax
or eax, 1
test eax, eax
jne 0x40f014
xor edi, edi
jmp 0x40f1d1
cmp byte [ebp - 0x110], 0
jne 0x40f032
lea ecx, [ebp - 0x110]
sub ecx, edi
mov al, byte [edi]
lea edi, [edi + 1]
mov byte [ecx + edi - 1], al
test al, al
jne 0x40f025
mov edi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
lea eax, [ebp - 0x218]
push 0x41e700
push eax
call edi
mov esi, eax
add esp, 8
test esi, esi
jne 0x40f07d
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
add esp, 4
push eax
lea eax, [ebp - 0x218]
push eax
push str.ERROR:_fopen:__s:__s_n
call fcn.004035a0
add esp, 0xc
or edi, 0xffffffff
jmp 0x40f1d1
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fileno]
add esp, 4
lea ecx, [ebp - 0x248]
push ecx
push eax
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__fstat64i32]
add esp, 8
test eax, eax
je 0x40f0d4
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
add esp, 4
push eax
lea eax, [ebp - 0x218]
push eax
push str.ERROR:_fstat:__s:__s_n
call fcn.004035a0
add esp, 0xc
or edi, 0xffffffff
jmp 0x40f1d1
lea eax, [ebp - 0x110]
push 0x41ea64
push eax
call edi
add esp, 8
mov dword [ebp - 0x25c], eax
test eax, eax
jne 0x40f116
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
add esp, 4
push eax
lea eax, [ebp - 0x110]
jmp 0x40f067
push 0x100000
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
mov ebx, eax
push esi
test ebx, ebx
jne 0x40f153
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
call esi
add esp, 4
push dword [ebp - 0x25c]
call esi
add esp, 4
push str.ERROR:_Unable_to_allocate_memory_n
call fcn.004035a0
add esp, 4
or edi, 0xffffffff
jmp 0x40f1d1
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_feof]
add esp, 4
test eax, eax
jne 0x40f1ae
cmp dword [0x42ca80], 0
jne 0x40f1ae
push esi
push 0x100000
push 1
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov edi, eax
add esp, 0x10
test edi, edi
js 0x40f248
push dword [ebp - 0x25c]
push edi
push 1
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp eax, edi
jne 0x40f233
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_feof]
add esp, 4
test eax, eax
je 0x40f160
xor edi, edi
push ebx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
push esi
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
call esi
add esp, 4
push dword [ebp - 0x25c]
call esi
add esp, 4
push dword [ebp - 0x26c]
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call esi
mov ebx, dword [ebp - 0x268]
add esp, 4
push dword [ebx + 4]
call esi
mov eax, dword [ebx]
add esp, 4
test eax, eax
je 0x40f20b
push eax
call dword [sym.imp.zip.dll_zip_unchange_all]
add esp, 4
push dword [ebx]
call dword [sym.imp.zip.dll_zip_close]
add esp, 4
push ebx
call esi
mov ecx, dword [ebp - 4]
add esp, 4
cmp dword [0x42ca80], 0
mov eax, 0xfffffffe
cmovne edi, eax
xor ecx, ebp
mov eax, edi
pop edi
pop esi
pop ebx
call fcn.0041c84a
mov esp, ebp
pop ebp
ret
push str.ERROR:_fwrite_failed_n
call fcn.004035a0
add esp, 4
or edi, 0xffffffff
jmp 0x40f1b0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
add esp, 4
push eax
push str.ERROR:_fread_failed:__s_n
call fcn.004035a0
add esp, 8
or edi, 0xffffffff
jmp 0x40f1b0