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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0xc3c
mov dword [esp + 0x24], eax
mov eax, dword [eax + 0x40]
lea ebp, [esp + 0x430]
mov dword [esp + 8], str.gzip__n__s__
mov ebx, ebp
mov dword [esp + 4], 0x400
mov dword [esp], ebp
mov dword [esp + 0xc], eax
call fcn.00410ca0
mov edx, dword [ebx]
add ebx, 4
lea eax, [edx - 0x1010101]
not edx
and eax, edx
and eax, 0x80808080
je 0x405d56
mov edx, eax
shr edx, 0x10
test eax, 0x8080
cmove eax, edx
lea edx, [ebx + 2]
cmove ebx, edx
add al, al
mov eax, dword [esp + 0x24]
sbb ebx, 3
sub ebx, ebp
mov esi, dword [eax + 0x34]
movzx edx, byte [esi]
test dl, dl
je 0x405de1
cmp ebx, 0x3fd
ja 0x405de1
mov edi, dword [sym.imp.msvcrt.dll_isalnum]
jmp 0x405daf
add esi, 1
cmp ebx, 0x3fd
ja 0x405de1
movsx eax, dl
mov byte [esp + 0x18], dl
mov dword [esp], eax
call edi
movzx edx, byte [esp + 0x18]
test eax, eax
jne 0x405dcf
mov byte [esp + ebx + 0x430], 0x5c
add ebx, 1
mov byte [esp + ebx + 0x430], dl
movzx edx, byte [esi + 1]
add ebx, 1
test dl, dl
jne 0x405da4
mov byte [esp + ebx + 0x430], 0
mov dword [esp + 4], 0x414466
mov dword [esp], ebp
call dword [sym.imp.msvcrt.dll__popen]
test eax, eax
mov dword [esp + 0x2c], eax
je 0x4060b0
mov edx, dword [esp + 0x24]
mov eax, dword [edx + 0x34]
mov dword [esp + 8], str._s.gz
mov dword [esp + 4], 0x400
mov dword [esp + 0xc], eax
lea eax, [esp + 0x830]
mov dword [esp], eax
call fcn.00410ca0
lea edx, [esp + 0x830]
mov dword [esp + 4], 0x41446f
mov dword [esp], edx
call sub.msvcrt.dll_fopen
mov dword [esp + 0x28], 0
test eax, eax
mov dword [esp + 0x1c], eax
je 0x406018
mov eax, dword [esp + 0x24]
mov ebx, dword [eax + 0x44]
movzx eax, byte [ebx]
test al, al
jne 0x405e9c
jmp 0x405f35
lea edi, [esi - 0x37]
mov eax, dword [esp + 0x1c]
add ebp, edi
mov dword [esp], ebp
mov dword [esp + 4], eax
call sub.msvcrt.dll_fputc
cmp eax, 0xffffffff
je 0x405f13
add ebx, 2
movzx eax, byte [ebx]
test al, al
je 0x405f35
movzx esi, byte [ebx + 1]
mov edx, esi
test dl, dl
je 0x405f35
movsx edi, al
lea ebp, [edi - 0x30]
cmp ebp, 9
jbe 0x405eda
mov dword [esp], edi
lea ebp, [edi - 0x37]
call dword [sym.imp.msvcrt.dll_isupper]
shl ebp, 4
test eax, eax
jne 0x405edd
mov dword [esp], edi
xor ebp, ebp
call dword [sym.imp.msvcrt.dll_islower]
test eax, eax
je 0x405edd
lea ebp, [edi - 0x57]
shl ebp, 4
mov eax, esi
movsx esi, al
lea edi, [esi - 0x30]
cmp edi, 9
jbe 0x405e73
mov dword [esp], esi
call dword [sym.imp.msvcrt.dll_isupper]
test eax, eax
mov edi, eax
jne 0x405e70
mov dword [esp], esi
sub esi, 0x57
call dword [sym.imp.msvcrt.dll_islower]
test eax, eax
cmovne edi, esi
jmp 0x405e73
add ebx, 2
mov dword [esp], str.putc
call sub.msvcrt.dll_perror
mov dword [esp + 0x28], 0xffffffff
movzx eax, byte [ebx]
test al, al
jne 0x405e9c
mov edi, 1
mov dword [esp + 0x20], edi
lea esi, [esp + 0x30]
mov edi, dword [esp + 0x2c]
lea ebp, [esp + 0x3a]
jmp 0x405f84
mov edx, esi
mov eax, ebp
sub edx, ebp
add ebx, edx
mov edx, dword [esp + 0x1c]
mov dword [esp + 8], ebx
mov dword [esp + 4], 1
mov dword [esp], eax
mov dword [esp + 0xc], edx
call sub.msvcrt.dll_fwrite
cmp ebx, eax
jne 0x406080
mov dword [esp + 0x20], 0
mov dword [esp], edi
call sub.msvcrt.dll_feof
test eax, eax
jne 0x405ff4
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0x400
mov dword [esp + 4], 1
mov dword [esp], esi
call sub.msvcrt.dll_fread
test eax, eax
mov ebx, eax
js 0x405fe0
mov ecx, dword [esp + 0x20]
xor edx, edx
mov eax, esi
test ecx, ecx
je 0x405f56
test byte [esp + 0x33], 8
je 0x405f50
mov dword [esp], ebp
call sub.msvcrt.dll_strlen
mov edx, esi
lea eax, [ebp + eax + 1]
sub edx, eax
jmp 0x405f56
mov dword [esp], 0x414477
call sub.msvcrt.dll_perror
mov dword [esp + 0x28], 0xffffffff
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
test eax, eax
je 0x406018
mov dword [esp], str.close
call sub.msvcrt.dll_perror
mov dword [esp + 0x28], 0xffffffff
mov eax, dword [esp + 0x2c]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
test eax, eax
je 0x40603c
mov dword [esp], str.close
call sub.msvcrt.dll_perror
mov dword [esp + 0x28], 0xffffffff
mov edx, dword [esp + 0x24]
mov eax, dword [edx + 0x34]
mov dword [esp], eax
call sub.msvcrt.dll__unlink
mov edx, dword [esp + 0x24]
mov eax, dword [edx + 0x34]
mov dword [esp], eax
call sub.msvcrt.dll_free
lea eax, [esp + 0x830]
mov dword [esp], eax
call sub.msvcrt.dll__strdup
mov edx, dword [esp + 0x24]
mov dword [edx + 0x34], eax
mov eax, dword [esp + 0x28]
add esp, 0xc3c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], str.fwrite
call sub.msvcrt.dll_perror
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x28], 0xffffffff
mov dword [esp], eax
call sub.msvcrt.dll_fclose
test eax, eax
je 0x406018
jmp 0x406004
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x27
mov dword [esp + 4], 1
mov dword [esp], str.problem_with_gzip__unable_to_compress._n
add eax, 0x40
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
mov dword [esp + 0x28], 0
mov eax, dword [esp + 0x28]
add esp, 0xc3c
pop ebx
pop esi
pop edi
pop ebp
ret