Function at 0x40346d
Capabilities:
Compress data via zlib inflate or deflate

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 8]
sub esp, 0x30
push edi
test edx, edx
je 0x404907
mov edi, dword [edx + 0x1c]
test edi, edi
je 0x404907
cmp dword [edx + 0xc], 0
je 0x404907
cmp dword [edx], 0
jne 0x403416
cmp dword [edx + 4], 0
jne 0x404907
cmp dword [edi], 0xb
jne 0x403421
mov dword [edi], 0xc
mov ecx, dword [edx + 0x10]
mov eax, dword [edx + 0xc]
mov dword [ebp - 0x10], ecx
mov ecx, dword [edx + 4]
mov dword [ebp - 4], ecx
mov dword [ebp - 0x30], ecx
mov ecx, dword [ebp - 0x10]
push ebx
mov ebx, dword [edi + 0x38]
mov dword [ebp - 0x20], ecx
mov ecx, dword [edi]
mov dword [ebp - 0x18], eax
mov eax, dword [edx]
push esi
mov esi, dword [edi + 0x3c]
mov dword [ebp - 8], eax
mov dword [ebp - 0x28], 0
cmp ecx, 0x1f
jbe switch.0x00403466
mov eax, 0xfffffffe
pop esi
pop ebx
pop edi
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 8]
jmp dword [ecx*4 + 0x404914]
cmp dword [edi + 8], 0
jne 0x40347e
mov dword [edi], 0xc
jmp 0x404777
cmp esi, 0x10
jae 0x4034a5
cmp dword [ebp - 4], 0
je 0x4047ce
movzx edx, byte [eax]
dec dword [ebp - 4]
mov ecx, esi
shl edx, cl
inc eax
add esi, 8
mov dword [ebp - 8], eax
add ebx, edx
cmp esi, 0x10
jb 0x403483
test byte [edi + 8], 2
je 0x4034ec
cmp ebx, 0x8b1f
jne 0x4034ec
push 0
push 0
push 0
call fcn.00404cf0
mov dword [edi + 0x18], eax
push 2
lea eax, [ebp - 0x14]
mov word [ebp - 0x14], bx
mov ecx, dword [edi + 0x18]
push eax
push ecx
call fcn.00404cf0
add esp, 0x18
mov dword [edi + 0x18], eax
mov eax, dword [ebp - 8]
xor ebx, ebx
xor esi, esi
mov dword [edi], 1
jmp 0x404777
mov eax, dword [edi + 0x20]
mov dword [edi + 0x10], 0
test eax, eax
je 0x403501
mov dword [eax + 0x30], 0xffffffff
test byte [edi + 8], 1
je 0x4035ad
movzx eax, bl
shl eax, 8
mov edx, ebx
shr edx, 8
add eax, edx
xor edx, edx
mov ecx, 0x1f
div ecx
test edx, edx
jne 0x4035ad
mov edx, ebx
and dl, 0xf
cmp dl, 8
je 0x403545
mov eax, dword [ebp + 8]
mov dword [eax + 0x18], str.unknown_compression_method
mov eax, dword [ebp - 8]
jmp 0x404771
mov eax, dword [edi + 0x24]
shr ebx, 4
mov ecx, ebx
and ecx, 0xf
sub esi, 4
add ecx, 8
test eax, eax
jne 0x403597
mov dword [edi + 0x24], ecx
mov edx, 1
shl edx, cl
push 0
push 0
push 0
mov dword [edi + 0x14], edx
call fcn.004067d0
mov ecx, dword [ebp + 8]
shr ebx, 8
not ebx
and ebx, 2
or ebx, 9
mov dword [edi + 0x18], eax
mov dword [ecx + 0x30], eax
mov eax, dword [ebp - 8]
mov dword [edi], ebx
add esp, 0xc
xor ebx, ebx
xor esi, esi
jmp 0x404777
cmp ecx, eax
jbe 0x40355d
mov ecx, dword [ebp + 8]
mov eax, dword [ebp - 8]
mov dword [ecx + 0x18], str.invalid_window_size
jmp 0x404771
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 8]
mov dword [edx + 0x18], 0x571190
jmp 0x404771
cmp esi, 0x10
jae 0x4035e6
cmp dword [ebp - 4], 0
je 0x4047ce
movzx edx, byte [eax]
dec dword [ebp - 4]
mov ecx, esi
shl edx, cl
inc eax
add esi, 8
mov dword [ebp - 8], eax
add ebx, edx
cmp esi, 0x10
jb 0x4035c4
mov dword [edi + 0x10], ebx
cmp bl, 8
je 0x4035fd
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x18], str.unknown_compression_method
jmp 0x404771
test ebx, 0xe000
je 0x403614
mov edx, dword [ebp + 8]
mov dword [edx + 0x18], str.unknown_header_flags_set
jmp 0x404771
mov ecx, dword [edi + 0x20]
test ecx, ecx
je 0x403625
mov edx, ebx
shr edx, 8
and edx, 1
mov dword [ecx], edx
test dword [edi + 0x10], 0x200
je 0x40364f
mov byte [ebp - 0x14], bl
shr ebx, 8
push 2
lea eax, [ebp - 0x14]
mov byte [ebp - 0x13], bl
mov ecx, dword [edi + 0x18]
push eax
push ecx
call fcn.00404cf0
mov dword [edi + 0x18], eax
mov eax, dword [ebp - 8]
add esp, 0xc
xor ebx, ebx
xor esi, esi
mov dword [edi], 2
jmp 0x403660
cmp esi, 0x20
jae 0x403682
cmp dword [ebp - 4], 0
je 0x4047ce
movzx edx, byte [eax]
dec dword [ebp - 4]
mov ecx, esi
shl edx, cl
inc eax
add esi, 8
mov dword [ebp - 8], eax
add ebx, edx
cmp esi, 0x20
jb 0x403660
mov ecx, dword [edi + 0x20]
test ecx, ecx
je 0x40368c
mov dword [ecx + 4], ebx
test dword [edi + 0x10], 0x200
je 0x4036c6
mov byte [ebp - 0x14], bl
mov eax, ebx
mov ecx, ebx
shr eax, 8
shr ecx, 0x10
shr ebx, 0x18
push 4
lea edx, [ebp - 0x14]
mov byte [ebp - 0x13], al
mov byte [ebp - 0x12], cl
mov byte [ebp - 0x11], bl
mov eax, dword [edi + 0x18]
push edx
push eax
call fcn.00404cf0
mov dword [edi + 0x18], eax
mov eax, dword [ebp - 8]
add esp, 0xc
xor ebx, ebx
xor esi, esi
mov dword [edi], 3
jmp 0x4036e0
cmp esi, 0x10
jae 0x403702
jmp 0x4036e0
cmp dword [ebp - 4], 0
je 0x4047ce
movzx edx, byte [eax]
dec dword [ebp - 4]
mov ecx, esi
shl edx, cl
inc eax
add esi, 8
mov dword [ebp - 8], eax
add ebx, edx
cmp esi, 0x10
jb 0x4036e0
mov ecx, dword [edi + 0x20]
test ecx, ecx
je 0x40371f
mov edx, ebx
and edx, 0xff
mov dword [ecx + 8], edx
mov edx, dword [edi + 0x20]
mov ecx, ebx
shr ecx, 8
mov dword [edx + 0xc], ecx
test dword [edi + 0x10], 0x200
je 0x403749
mov byte [ebp - 0x14], bl
shr ebx, 8
push 2
lea eax, [ebp - 0x14]
mov byte [ebp - 0x13], bl
mov ecx, dword [edi + 0x18]
push eax
push ecx
call fcn.00404cf0
mov dword [edi + 0x18], eax
mov eax, dword [ebp - 8]
add esp, 0xc
xor ebx, ebx
xor esi, esi
mov dword [edi], 4
test dword [edi + 0x10], 0x400
je 0x4037c0
cmp esi, 0x10
jae 0x403783
cmp dword [ebp - 4], 0
je 0x4047ce
movzx edx, byte [eax]
dec dword [ebp - 4]
mov ecx, esi
shl edx, cl
inc eax
add esi, 8
mov dword [ebp - 8], eax
add ebx, edx
cmp esi, 0x10
jb 0x403761
mov ecx, dword [edi + 0x20]
mov dword [edi + 0x40], ebx
test ecx, ecx
je 0x403790
mov dword [ecx + 0x14], ebx
test dword [edi + 0x10], 0x200
je 0x4037ba
mov byte [ebp - 0x14], bl
shr ebx, 8
push 2
lea eax, [ebp - 0x14]
mov byte [ebp - 0x13], bl
mov ecx, dword [edi + 0x18]
push eax
push ecx
call fcn.00404cf0
mov dword [edi + 0x18], eax
mov eax, dword [ebp - 8]
add esp, 0xc
xor ebx, ebx
xor esi, esi
jmp 0x4037ce
mov ecx, dword [edi + 0x20]
test ecx, ecx
je 0x4037ce
mov dword [ecx + 0x10], 0
mov dword [edi], 5
test dword [edi + 0x10], 0x400
je 0x403877
mov ecx, dword [edi + 0x40]
mov edx, dword [ebp - 4]
mov dword [ebp - 0xc], ecx
cmp ecx, edx
jbe 0x4037f3
mov ecx, edx
mov dword [ebp - 0xc], edx
test ecx, ecx
je 0x40386d
mov edx, dword [edi + 0x20]
test edx, edx
je 0x40383c
mov edx, dword [edx + 0x10]
mov dword [ebp - 0x2c], edx
test edx, edx
je 0x40383c
mov edx, dword [edi + 0x20]
mov eax, dword [edx + 0x14]
sub eax, dword [edi + 0x40]
mov edx, dword [edx + 0x18]
mov dword [ebp - 0x1c], eax
add eax, ecx
cmp eax, edx
jbe 0x403822
sub edx, dword [ebp - 0x1c]
mov ecx, edx
mov edx, dword [ebp - 0x2c]
add edx, dword [ebp - 0x1c]
push ecx
mov ecx, dword [ebp - 8]
push ecx
push edx
call fcn.0053dc00
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
add esp, 0xc
test dword [edi + 0x10], 0x200
je 0x403862
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 8]
mov eax, dword [edi + 0x18]
push ecx
push edx
push eax
call fcn.00404cf0
mov ecx, dword [ebp - 0xc]
mov dword [edi + 0x18], eax
mov eax, dword [ebp - 8]
add esp, 0xc
sub dword [ebp - 4], ecx
add eax, ecx
sub dword [edi + 0x40], ecx
mov dword [ebp - 8], eax
cmp dword [edi + 0x40], 0
jne 0x4047ce
mov dword [edi + 0x40], 0
mov dword [edi], 6
test dword [edi + 0x10], 0x800
je 0x40391b
cmp dword [ebp - 4], 0
je 0x4047ce
xor ecx, ecx
lea ecx, [ecx]
movzx edx, byte [ecx + eax]
inc ecx
mov dword [ebp - 0xc], ecx
mov ecx, dword [edi + 0x20]
mov dword [ebp - 0x1c], edx
test ecx, ecx
je 0x4038d3
mov edx, dword [ecx + 0x1c]
mov dword [ebp - 0x2c], edx
test edx, edx
je 0x4038d3
mov edx, dword [edi + 0x40]
cmp edx, dword [ecx + 0x20]
jae 0x4038d3
mov eax, dword [ebp - 0x2c]
mov cl, byte [ebp - 0x1c]
mov byte [eax + edx], cl
inc dword [edi + 0x40]
mov eax, dword [ebp - 8]
cmp dword [ebp - 0x1c], 0
je 0x4038e1
mov ecx, dword [ebp - 0xc]
cmp ecx, dword [ebp - 4]
jb 0x4038a0
test dword [edi + 0x10], 0x200
je 0x403904
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
mov ecx, dword [edi + 0x18]
push edx
push eax
push ecx
call fcn.00404cf0
mov dword [edi + 0x18], eax
mov eax, dword [ebp - 8]
add esp, 0xc
mov ecx, dword [ebp - 0xc]
sub dword [ebp - 4], ecx
add eax, ecx
cmp dword [ebp - 0x1c], 0
mov dword [ebp - 8], eax
jne 0x4047ce
jmp 0x403929
mov ecx, dword [edi + 0x20]
test ecx, ecx
je 0x403929
mov dword [ecx + 0x1c], 0
mov dword [edi + 0x40], 0
mov dword [edi], 7
test dword [edi + 0x10], 0x1000
je 0x4039cb
cmp dword [ebp - 4], 0
je 0x4047ce
xor ecx, ecx
nop
movzx edx, byte [ecx + eax]
inc ecx
mov dword [ebp - 0xc], ecx
mov ecx, dword [edi + 0x20]
mov dword [ebp - 0x1c], edx
test ecx, ecx
je 0x403983
mov edx, dword [ecx + 0x24]
mov dword [ebp - 0x2c], edx
test edx, edx
je 0x403983
mov edx, dword [edi + 0x40]
cmp edx, dword [ecx + 0x28]
jae 0x403983
mov eax, dword [ebp - 0x2c]
mov cl, byte [ebp - 0x1c]
mov byte [eax + edx], cl
inc dword [edi + 0x40]
mov eax, dword [ebp - 8]
cmp dword [ebp - 0x1c], 0
je 0x403991
mov ecx, dword [ebp - 0xc]
cmp ecx, dword [ebp - 4]
jb 0x403950
test dword [edi + 0x10], 0x200
je 0x4039b4
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
mov ecx, dword [edi + 0x18]
push edx
push eax
push ecx
call fcn.00404cf0
mov dword [edi + 0x18], eax
mov eax, dword [ebp - 8]
add esp, 0xc
mov ecx, dword [ebp - 0xc]
sub dword [ebp - 4], ecx
add eax, ecx
cmp dword [ebp - 0x1c], 0
mov dword [ebp - 8], eax
jne 0x4047ce
jmp 0x4039d9
mov ecx, dword [edi + 0x20]
test ecx, ecx
je 0x4039d9
mov dword [ecx + 0x24], 0
mov dword [edi], 8
test dword [edi + 0x10], 0x200
je 0x403a2d
cmp esi, 0x10
jae 0x403a12
lea ecx, [ecx]
cmp dword [ebp - 4], 0
je 0x4047ce
movzx edx, byte [eax]
dec dword [ebp - 4]
mov ecx, esi
shl edx, cl
inc eax
add esi, 8
mov dword [ebp - 8], eax
add ebx, edx
cmp esi, 0x10
jb 0x4039f0
movzx ecx, word [edi + 0x18]
cmp ebx, ecx
je 0x403a29
mov edx, dword [ebp + 8]
mov dword [edx + 0x18], str.header_crc_mismatch
jmp 0x404771
xor ebx, ebx
xor esi, esi
mov eax, dword [edi + 0x20]
test eax, eax
je 0x403a4a
mov ecx, dword [edi + 0x10]
sar ecx, 9
and ecx, 1
mov dword [eax + 0x2c], ecx
mov edx, dword [edi + 0x20]
mov dword [edx + 0x30], 1
push 0
push 0
push 0
call fcn.00404cf0
mov ecx, dword [ebp + 8]
mov dword [edi + 0x18], eax
mov dword [ecx + 0x30], eax
mov eax, dword [ebp - 8]
add esp, 0xc
mov dword [edi], 0xb
jmp 0x404777
cmp esi, 0x20
jae 0x403a96
cmp dword [ebp - 4], 0
je 0x4047ce
movzx edx, byte [eax]
dec dword [ebp - 4]
mov ecx, esi
shl edx, cl
inc eax
add esi, 8
mov dword [ebp - 8], eax
add ebx, edx
cmp esi, 0x20
jb 0x403a74
mov ecx, ebx
and ecx, 0xff00
mov edx, ebx
shl edx, 0x10
add ecx, edx
mov edx, ebx
shr edx, 8
shl ecx, 8
and edx, 0xff00
add ecx, edx
mov edx, dword [ebp + 8]
shr ebx, 0x18
add ecx, ebx
mov dword [edi + 0x18], ecx
mov dword [edx + 0x30], ecx
xor ebx, ebx
xor esi, esi
mov dword [edi], 0xa
cmp dword [edi + 0xc], 0
je 0x40478e
push 0
push 0
push 0
call fcn.004067d0
mov ecx, dword [ebp + 8]
mov dword [edi + 0x18], eax
mov dword [ecx + 0x30], eax
mov eax, dword [ebp - 8]
add esp, 0xc
mov dword [edi], 0xb
mov ecx, dword [ebp + 0xc]
cmp ecx, 5
je 0x4047ce
cmp ecx, 6
je 0x4047ce
cmp dword [edi + 4], 0
je 0x403b26
mov ecx, esi
and ecx, 7
shr ebx, cl
sub esi, ecx
mov dword [edi], 0x1b
jmp 0x404777
cmp esi, 3
jae 0x403b52
jmp 0x403b30
cmp dword [ebp - 4], 0
je 0x4047ce
movzx edx, byte [eax]
dec dword [ebp - 4]
mov ecx, esi
shl edx, cl
inc eax
add esi, 8
mov dword [ebp - 8], eax
add ebx, edx
cmp esi, 3
jb 0x403b30
mov ecx, ebx
and ecx, 1
shr ebx, 1
mov dword [edi + 4], ecx
mov ecx, ebx
and ecx, 3
cmp ecx, 3
ja case.default.0x403b6a
jmp dword [ecx*4 + 0x404994]
shr ebx, 2
mov dword [edi], 0xe
sub esi, 3
jmp 0x404777
cmp dword [ebp + 0xc], 6
mov dword [edi + 0x4c], 0x570730
mov dword [edi + 0x54], 9
mov dword [edi + 0x50], 0x570f30
mov dword [edi + 0x58], 5
mov dword [edi], 0x14
jne case.default.0x403b6a
shr ebx, 2
sub esi, 3
jmp 0x4047ce
shr ebx, 2
mov dword [edi], 0x11
sub esi, 3
jmp 0x404777
mov ecx, dword [ebp + 8]
test byte [ecx + 0x34], 1
je 0x403be0
shr ebx, 2
mov dword [edi], 0xd
sub esi, 3
jmp 0x404777
mov dword [ecx + 0x18], 0x57114c
mov dword [edi], 0x1e
shr ebx, 2
sub esi, 3
jmp 0x404777
cmp esi, 2
jae 0x403c22
lea ecx, [ecx]
cmp dword [ebp - 4], 0
je 0x4047ce
movzx edx, byte [eax]
dec dword [ebp - 4]
mov ecx, esi
shl edx, cl
inc eax
add esi, 8
mov dword [ebp - 8], eax
add ebx, edx
cmp esi, 2
jb 0x403c00
invalid