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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x51c
or dword [ebp - 0x18], 0xffffffff
push ebx
push esi
xor esi, esi
push edi
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x10], esi
mov ebx, 0x200
mov eax, dword [ebp + 0x10]
lea ecx, [esi + 0x200]
mov eax, dword [eax + 2]
cmp ecx, eax
jbe 0x401949
sub eax, esi
mov dword [ebp - 8], eax
jmp 0x40194c
mov dword [ebp - 8], ebx
push dword [ebp + 0xc]
lea eax, [ebp - 0x51c]
push dword [ebp - 8]
push 1
pop edi
push edi
push eax
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, dword [ebp - 8]
mov dword [ebp - 0x20], eax
jne 0x401b01
add esi, eax
xor ecx, ecx
cmp dword [ebp - 0x18], 0xffffffff
mov dword [ebp - 0x1c], esi
mov dword [ebp - 8], ecx
jne 0x401993
mov dl, byte [ebp - 0x51c]
mov dword [ebp - 0x18], ecx
mov byte [ebp - 2], dl
mov dword [ebp - 8], edi
mov ecx, edi
cmp ecx, eax
jge 0x401af0
mov eax, dword [ebp - 0x10]
xor esi, esi
sub eax, esi
je 0x401a36
dec eax
je 0x401a11
dec eax
jne 0x401b2b
movzx esi, byte [ebp + ecx - 0x51c]
cmp esi, 0xa
mov dword [ebp - 0x18], esi
jge 0x4019f3
mov al, byte [ebp - 1]
cmp al, byte [ebp - 2]
je 0x4019d2
mov byte [ebp - 0x11c], al
jmp 0x4019d4
xor edi, edi
lea eax, [esi + 1]
push eax
movsx eax, byte [ebp - 2]
push eax
lea eax, [ebp + edi - 0x11c]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
lea esi, [edi + esi + 1]
jmp 0x401a0b
movsx eax, byte [ebp - 1]
add esi, 0xfffffffa
push esi
push eax
lea eax, [ebp - 0x11c]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
and dword [ebp - 0x10], 0
jmp 0x401a4e
mov al, byte [ebp + ecx - 0x51c]
cmp al, byte [ebp - 2]
jne 0x401a26
mov dword [ebp - 0x10], 2
jmp 0x401a4e
mov cl, byte [ebp - 1]
mov esi, edi
mov byte [ebp - 0x11c], cl
mov byte [ebp - 1], al
jmp 0x401a4e
mov al, byte [ebp + ecx - 0x51c]
xor ecx, ecx
cmp al, byte [ebp - 2]
mov byte [ebp - 1], al
sete cl
inc ecx
xor esi, esi
mov dword [ebp - 0x10], ecx
mov eax, dword [ebp - 0x14]
lea edi, [esi + eax]
cmp edi, ebx
jb 0x401aba
mov edi, ebx
lea ecx, [ebp - 0x11c]
sub edi, eax
lea eax, [ebp + eax - 0x31c]
push edi
push ecx
push eax
sub esi, edi
call sub.MSVCRT.dll_memcpy
push dword [ebp + 8]
lea eax, [ebp - 0x31c]
push ebx
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x1c
cmp eax, ebx
je 0x401a9a
mov ecx, dword [ebp + 8]
test byte [ecx + 0xc], 0x20
jne 0x401b54
add dword [ebp - 0xc], eax
lea eax, [ebp + edi - 0x11c]
push esi
push eax
lea eax, [ebp - 0x31c]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov dword [ebp - 0x14], esi
jmp 0x401ad8
lea eax, [ebp - 0x11c]
push esi
push eax
mov eax, dword [ebp - 0x14]
lea eax, [ebp + eax - 0x31c]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov dword [ebp - 0x14], edi
inc dword [ebp - 8]
push 1
mov eax, dword [ebp - 8]
pop edi
cmp eax, dword [ebp - 0x20]
jge 0x401aed
mov ecx, eax
jmp 0x40199b
mov esi, dword [ebp - 0x1c]
mov eax, dword [ebp + 0x10]
cmp esi, dword [eax + 2]
jae 0x401b82
jmp 0x401932
cmp dword [0x403710], 0
jne 0x401b24
mov dword [0x403708], str.Z:work_v3unzip_v3unzip.c
mov dword [0x40370c], 0x136
mov dword [0x403710], edi
push 4
jmp 0x401c9f
cmp dword [0x403710], esi
jne 0x401b4d
mov dword [0x403708], str.Z:work_v3unzip_v3unzip.c
mov dword [0x40370c], 0x185
mov dword [0x403710], edi
push 7
jmp 0x401c9f
cmp dword [0x403710], 0
jne 0x401b7b
mov dword [0x403708], str.Z:work_v3unzip_v3unzip.c
mov dword [0x40370c], 0x195
mov dword [0x403710], 1
push 5
jmp 0x401c9f
cmp dword [ebp - 0x10], 0
je 0x401b91
cmp dword [ebp - 0x10], edi
jne 0x401c6f
mov esi, dword [ebp - 0x14]
cmp esi, ebx
jae 0x401bee
cmp dword [ebp - 0x10], edi
jne 0x401ba8
mov al, byte [ebp - 1]
mov byte [ebp + esi - 0x31c], al
inc esi
push dword [ebp + 8]
lea eax, [ebp - 0x31c]
push esi
push edi
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
cmp eax, esi
je 0x401be6
cmp dword [0x403710], 0
jne 0x401b7b
mov dword [0x403708], str.Z:work_v3unzip_v3unzip.c
mov dword [0x40370c], 0x1b3
mov dword [0x403710], edi
jmp 0x401b7b
add dword [ebp - 0xc], eax
jmp 0x401c6f
push dword [ebp + 8]
mov ebx, dword [sym.imp.MSVCRT.dll_fwrite]
lea eax, [ebp - 0x31c]
push esi
push edi
push eax
call ebx
add esp, 0x10
cmp eax, esi
je 0x401c2c
cmp dword [0x403710], 0
jne 0x401b7b
mov dword [0x403708], str.Z:work_v3unzip_v3unzip.c
mov dword [0x40370c], 0x1bb
jmp 0x401bde
add dword [ebp - 0xc], eax
cmp dword [ebp - 0x10], edi
jne 0x401c6f
push dword [ebp + 8]
lea eax, [ebp - 1]
push edi
push edi
push eax
call ebx
add esp, 0x10
cmp eax, edi
je 0x401c6c
cmp dword [0x403710], 0
jne 0x401b7b
mov dword [0x403708], str.Z:work_v3unzip_v3unzip.c
mov dword [0x40370c], 0x1c4
jmp 0x401bde
inc dword [ebp - 0xc]
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp - 0xc]
cmp eax, dword [ecx + 6]
je 0x401ca2
cmp dword [0x403710], 0
jne 0x401c9d
mov dword [0x403708], str.Z:work_v3unzip_v3unzip.c
mov dword [0x40370c], 0x1cc
mov dword [0x403710], edi
push 8
pop eax
jmp 0x401ca4
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret