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

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor edx, edx
cmp edi, edx
je 0x40791e
mov esi, dword [edi + 0x1c]
cmp esi, edx
je 0x40791e
mov ecx, dword [ebp + 0xc]
cmp ecx, 5
jg 0x40791e
cmp ecx, edx
jl 0x40791e
cmp dword [edi + 0xc], edx
je 0x407916
cmp dword [edi], edx
jne 0x407199
cmp dword [edi + 4], edx
jne 0x407916
mov eax, dword [esi + 4]
cmp eax, 0x29a
jne 0x4071ac
cmp ecx, 4
jne 0x407916
cmp dword [edi + 0x10], edx
je 0x40772a
mov edx, dword [esi + 0x28]
cmp eax, 0x2a
mov dword [esi], edi
mov dword [ebp - 4], edx
mov dword [esi + 0x28], ecx
jne 0x407460
push 2
pop edx
cmp dword [esi + 0x18], edx
jne 0x4073c9
xor ebx, ebx
push ebx
push ebx
push ebx
call fcn.0040baaf
mov dword [edi + 0x30], eax
mov eax, dword [esi + 8]
mov ecx, dword [esi + 0x14]
add esp, 0xc
mov byte [eax + ecx], 0x1f
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 8]
mov byte [ecx + eax], 0x8b
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 8]
mov byte [ecx + eax], 8
mov eax, dword [esi + 0x1c]
inc dword [esi + 0x14]
mov ecx, dword [esi + 0x14]
cmp eax, ebx
jne 0x40729c
mov eax, dword [esi + 8]
and byte [eax + ecx], bl
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 8]
and byte [ecx + eax], bl
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 8]
and byte [ecx + eax], bl
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 8]
and byte [ecx + eax], bl
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 8]
and byte [ecx + eax], bl
mov eax, dword [esi + 0x84]
inc dword [esi + 0x14]
mov ecx, dword [esi + 0x14]
cmp eax, 9
jne 0x407265
push 2
jmp 0x407279
cmp dword [esi + 0x88], 2
jge 0x407277
cmp eax, 2
jl 0x407277
xor eax, eax
jmp 0x40727a
push 4
pop eax
mov edx, dword [esi + 8]
mov byte [edx + ecx], al
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 8]
mov byte [ecx + eax], 0xb
inc dword [esi + 0x14]
mov dword [esi + 4], 0x71
jmp 0x407460
mov edx, dword [eax + 0x24]
neg edx
sbb dl, dl
and edx, 0x10
cmp dword [eax + 0x2c], 0
sete bl
dec ebx
and ebx, 2
add dl, bl
mov ebx, dword [eax + 0x1c]
neg ebx
sbb bl, bl
and ebx, 8
add dl, bl
mov ebx, dword [eax + 0x10]
neg ebx
sbb bl, bl
and ebx, 4
add dl, bl
cmp dword [eax], 0
setne al
add dl, al
mov eax, dword [esi + 8]
mov byte [eax + ecx], dl
mov ecx, dword [esi + 0x1c]
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov edx, dword [esi + 8]
mov cl, byte [ecx + 4]
mov byte [edx + eax], cl
mov ecx, dword [esi + 0x1c]
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov ecx, dword [ecx + 4]
mov edx, dword [esi + 8]
shr ecx, 8
mov byte [edx + eax], cl
mov ecx, dword [esi + 0x1c]
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov ecx, dword [ecx + 4]
mov edx, dword [esi + 8]
shr ecx, 0x10
mov byte [edx + eax], cl
mov ecx, dword [esi + 0x1c]
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov ecx, dword [ecx + 4]
mov edx, dword [esi + 8]
shr ecx, 0x18
mov byte [edx + eax], cl
mov eax, dword [esi + 0x84]
inc dword [esi + 0x14]
mov ecx, dword [esi + 0x14]
cmp eax, 9
jne 0x40733f
push 2
jmp 0x407353
cmp dword [esi + 0x88], 2
jge 0x407351
cmp eax, 2
jl 0x407351
xor eax, eax
jmp 0x407354
push 4
pop eax
mov edx, dword [esi + 8]
xor ebx, ebx
mov byte [edx + ecx], al
mov ecx, dword [esi + 0x1c]
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov edx, dword [esi + 8]
mov cl, byte [ecx + 0xc]
mov byte [edx + eax], cl
mov eax, dword [esi + 0x1c]
inc dword [esi + 0x14]
mov ecx, dword [esi + 0x14]
cmp dword [eax + 0x10], ebx
je 0x4073a0
mov edx, dword [esi + 8]
mov al, byte [eax + 0x14]
mov byte [edx + ecx], al
mov ecx, dword [esi + 0x1c]
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov ecx, dword [ecx + 0x14]
mov edx, dword [esi + 8]
shr ecx, 8
mov byte [edx + eax], cl
inc dword [esi + 0x14]
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], ebx
je 0x4073ba
push ecx
push dword [esi + 8]
push dword [edi + 0x30]
call fcn.0040baaf
add esp, 0xc
mov dword [edi + 0x30], eax
mov dword [esi + 0x20], ebx
mov dword [esi + 4], 0x45
jmp 0x407460
mov ecx, dword [esi + 0x30]
shl ecx, 0xc
sub ecx, 0x7800
cmp dword [esi + 0x88], edx
jge 0x4073ff
mov eax, dword [esi + 0x84]
cmp eax, edx
jl 0x4073ff
cmp eax, 6
jge 0x4073f1
push 1
pop eax
jmp 0x407401
xor ebx, ebx
cmp eax, 6
setne bl
add ebx, edx
mov eax, ebx
jmp 0x407401
xor eax, eax
shl eax, 6
or ecx, eax
cmp dword [esi + 0x6c], 0
je 0x40740f
or ecx, 0x20
push 0x1f
mov eax, ecx
xor edx, edx
pop ebx
div ebx
mov dword [esi + 4], 0x71
sub ecx, edx
add ecx, ebx
push ecx
push esi
call fcn.00407926
xor ebx, ebx
pop ecx
cmp dword [esi + 0x6c], ebx
pop ecx
je 0x407452
mov eax, dword [edi + 0x30]
shr eax, 0x10
push eax
push esi
call fcn.00407926
mov eax, dword [edi + 0x30]
and eax, 0xffff
push eax
push esi
call fcn.00407926
add esp, 0x10
push ebx
push ebx
push ebx
call fcn.00409fab
add esp, 0xc
mov dword [edi + 0x30], eax
cmp dword [esi + 4], 0x45
jne 0x407533
mov ecx, dword [esi + 0x1c]
cmp dword [ecx + 0x10], 0
je 0x40752c
mov eax, dword [esi + 0x14]
mov dword [ebp + 8], eax
mov eax, dword [ecx + 0x14]
and eax, 0xffff
cmp dword [esi + 0x20], eax
jae 0x4074f3
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0xc]
jne 0x4074c8
cmp dword [ecx + 0x2c], 0
je 0x4074b6
cmp eax, dword [ebp + 8]
jbe 0x4074b6
sub eax, dword [ebp + 8]
push eax
mov eax, dword [esi + 8]
add eax, dword [ebp + 8]
push eax
push dword [edi + 0x30]
call fcn.0040baaf
add esp, 0xc
mov dword [edi + 0x30], eax
push edi
call fcn.00407950
mov eax, dword [esi + 0x14]
pop ecx
cmp eax, dword [esi + 0xc]
mov dword [ebp + 8], eax
je 0x4074f3
mov ecx, dword [esi + 0x1c]
mov edx, dword [esi + 0x20]
mov ebx, dword [esi + 8]
mov ecx, dword [ecx + 0x10]
mov cl, byte [ecx + edx]
mov byte [ebx + eax], cl
mov ecx, dword [esi + 0x1c]
inc dword [esi + 0x14]
inc dword [esi + 0x20]
mov edx, dword [ecx + 0x14]
mov eax, dword [esi + 0x20]
and edx, 0xffff
cmp eax, edx
jb 0x40748a
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], 0
je 0x40751d
mov eax, dword [esi + 0x14]
cmp eax, dword [ebp + 8]
jbe 0x40751d
sub eax, dword [ebp + 8]
push eax
mov eax, dword [esi + 8]
add eax, dword [ebp + 8]
push eax
push dword [edi + 0x30]
call fcn.0040baaf
add esp, 0xc
mov dword [edi + 0x30], eax
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x20]
cmp ecx, dword [eax + 0x14]
jne 0x407533
and dword [esi + 0x20], 0
mov dword [esi + 4], 0x49
cmp dword [esi + 4], 0x49
jne 0x4075e2
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x1c], 0
je 0x4075db
mov edx, dword [esi + 0x14]
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0xc]
jne 0x40758a
mov ecx, dword [esi + 0x1c]
cmp dword [ecx + 0x2c], 0
je 0x407579
cmp eax, edx
jbe 0x407579
sub eax, edx
push eax
mov eax, dword [esi + 8]
add eax, edx
push eax
push dword [edi + 0x30]
call fcn.0040baaf
add esp, 0xc
mov dword [edi + 0x30], eax
push edi
call fcn.00407950
mov eax, dword [esi + 0x14]
pop ecx
cmp eax, dword [esi + 0xc]
mov edx, eax
je 0x4075aa
mov ebx, dword [esi + 0x1c]
mov ecx, dword [esi + 0x20]
mov ebx, dword [ebx + 0x1c]
movzx ebx, byte [ebx + ecx]
inc ecx
mov dword [esi + 0x20], ecx
mov ecx, dword [esi + 8]
mov byte [ecx + eax], bl
inc dword [esi + 0x14]
test ebx, ebx
je 0x4075ad
jmp 0x40754d
push 1
pop ebx
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], 0
je 0x4075d4
mov eax, dword [esi + 0x14]
cmp eax, edx
jbe 0x4075d4
sub eax, edx
push eax
mov eax, dword [esi + 8]
add eax, edx
push eax
push dword [edi + 0x30]
call fcn.0040baaf
add esp, 0xc
mov dword [edi + 0x30], eax
test ebx, ebx
jne 0x4075e2
and dword [esi + 0x20], ebx
mov dword [esi + 4], 0x5b
cmp dword [esi + 4], 0x5b
jne 0x40768e
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x24], 0
je 0x407687
mov edx, dword [esi + 0x14]
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0xc]
jne 0x407639
mov ecx, dword [esi + 0x1c]
cmp dword [ecx + 0x2c], 0
je 0x407628
cmp eax, edx
jbe 0x407628
sub eax, edx
push eax
mov eax, dword [esi + 8]
add eax, edx
push eax
push dword [edi + 0x30]
call fcn.0040baaf
add esp, 0xc
mov dword [edi + 0x30], eax
push edi
call fcn.00407950
mov eax, dword [esi + 0x14]
pop ecx
cmp eax, dword [esi + 0xc]
mov edx, eax
je 0x407659
mov ebx, dword [esi + 0x1c]
mov ecx, dword [esi + 0x20]
mov ebx, dword [ebx + 0x24]
movzx ebx, byte [ebx + ecx]
inc ecx
mov dword [esi + 0x20], ecx
mov ecx, dword [esi + 8]
mov byte [ecx + eax], bl
inc dword [esi + 0x14]
test ebx, ebx
je 0x40765c
jmp 0x4075fc
push 1
pop ebx
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], 0
je 0x407683
mov eax, dword [esi + 0x14]
cmp eax, edx
jbe 0x407683
sub eax, edx
push eax
mov eax, dword [esi + 8]
add eax, edx
push eax
push dword [edi + 0x30]
call fcn.0040baaf
add esp, 0xc
mov dword [edi + 0x30], eax
test ebx, ebx
jne 0x40768e
mov dword [esi + 4], 0x67
cmp dword [esi + 4], 0x67
jne 0x4076ee
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], 0
je 0x4076e7
mov eax, dword [esi + 0x14]
inc eax
inc eax
cmp eax, dword [esi + 0xc]
jbe 0x4076ae
push edi
call fcn.00407950
pop ecx
mov eax, dword [esi + 0x14]
lea ecx, [eax + 2]
cmp ecx, dword [esi + 0xc]
ja 0x4076ee
mov ecx, dword [esi + 8]
mov dl, byte [edi + 0x30]
mov byte [ecx + eax], dl
inc dword [esi + 0x14]
mov ecx, dword [edi + 0x30]
mov eax, dword [esi + 0x14]
mov edx, dword [esi + 8]
shr ecx, 8
mov byte [edx + eax], cl
inc dword [esi + 0x14]
xor eax, eax
push eax
push eax
push eax
call fcn.0040baaf
add esp, 0xc
mov dword [edi + 0x30], eax
mov dword [esi + 4], 0x71
xor ebx, ebx
cmp dword [esi + 0x14], ebx
je 0x407706
push edi
call fcn.00407950
cmp dword [edi + 0x10], ebx
pop ecx
jne 0x407718
jmp 0x4077cf
cmp dword [edi + 4], ebx
jne 0x407718
mov eax, dword [ebp + 0xc]
cmp eax, dword [ebp - 4]
jg 0x407718
cmp eax, 4
jne 0x40772a
mov eax, dword [esi + 4]
mov ebx, 0x29a
cmp eax, ebx
jne 0x407739
cmp dword [edi + 4], 0
je 0x407739
mov eax, dword [0x41c5c0]
push 0xfffffffffffffffb
mov dword [edi + 0x18], eax
jmp 0x407920
xor ecx, ecx
cmp dword [edi + 4], ecx
jne 0x407756
cmp dword [esi + 0x74], ecx
jne 0x407756
cmp dword [ebp + 0xc], ecx
je 0x40781b
cmp eax, ebx
je 0x40781b
mov eax, dword [esi + 0x88]
cmp eax, 2
jne 0x40776c
push dword [ebp + 0xc]
push esi
call fcn.004087e3
jmp 0x407790
cmp eax, 3
jne 0x40777c
push dword [ebp + 0xc]
push esi
call fcn.0040858c
jmp 0x407790
mov eax, dword [esi + 0x84]
push dword [ebp + 0xc]
lea eax, [eax + eax*2]
push esi
call dword [eax*4 + 0x41bc88]
pop ecx
cmp eax, 2
pop ecx
je 0x40779c
cmp eax, 3
jne 0x40779f
mov dword [esi + 4], ebx
test eax, eax
je 0x407907
cmp eax, 2
je 0x407907
cmp eax, 1
jne 0x40781b
cmp dword [ebp + 0xc], eax
jne 0x4077d5
push esi
call fcn.0040a33c
pop ecx
xor ebx, ebx
push edi
call fcn.00407950
cmp dword [edi + 0x10], ebx
pop ecx
jne 0x40781b
or dword [esi + 0x28], 0xffffffff
jmp 0x407821
cmp dword [ebp + 0xc], 5
je 0x4077c1
xor ebx, ebx
push ebx
push ebx
push ebx
push esi
call fcn.0040a2a7
add esp, 0x10
cmp dword [ebp + 0xc], 3
jne 0x4077c3
mov eax, dword [esi + 0x4c]
mov ecx, dword [esi + 0x44]
mov word [ecx + eax*2 - 2], bx
mov eax, dword [esi + 0x4c]
lea eax, [eax + eax - 2]
push eax
push ebx
push dword [esi + 0x44]
call fcn.0040d070
add esp, 0xc
cmp dword [esi + 0x74], ebx
jne 0x4077c3
mov dword [esi + 0x6c], ebx
mov dword [esi + 0x5c], ebx
jmp 0x4077c3
cmp dword [ebp + 0xc], 4
je 0x407828
xor eax, eax
jmp 0x407921
mov eax, dword [esi + 0x18]
test eax, eax
jg 0x407836
push 1
jmp 0x407920
cmp eax, 2
jne 0x4078cb
mov eax, dword [esi + 8]
mov ecx, dword [esi + 0x14]
mov dl, byte [edi + 0x30]
mov byte [eax + ecx], dl
inc dword [esi + 0x14]
mov ecx, dword [edi + 0x30]
mov eax, dword [esi + 0x14]
mov edx, dword [esi + 8]
shr ecx, 8
mov byte [edx + eax], cl
inc dword [esi + 0x14]
mov ecx, dword [edi + 0x30]
mov eax, dword [esi + 0x14]
mov edx, dword [esi + 8]
shr ecx, 0x10
mov byte [edx + eax], cl
inc dword [esi + 0x14]
mov ecx, dword [edi + 0x30]
mov eax, dword [esi + 0x14]
mov edx, dword [esi + 8]
shr ecx, 0x18
mov byte [edx + eax], cl
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 8]
mov dl, byte [edi + 8]
mov byte [ecx + eax], dl
inc dword [esi + 0x14]
mov ecx, dword [edi + 8]
mov eax, dword [esi + 0x14]
mov edx, dword [esi + 8]
shr ecx, 8
mov byte [edx + eax], cl
inc dword [esi + 0x14]
mov ecx, dword [edi + 8]
mov eax, dword [esi + 0x14]
mov edx, dword [esi + 8]
shr ecx, 0x10
mov byte [edx + eax], cl
inc dword [esi + 0x14]
mov ecx, dword [edi + 8]
mov eax, dword [esi + 0x14]
mov edx, dword [esi + 8]
shr ecx, 0x18
mov byte [edx + eax], cl
inc dword [esi + 0x14]
jmp 0x4078ea
mov eax, dword [edi + 0x30]
shr eax, 0x10
push eax
push esi
call fcn.00407926
mov eax, dword [edi + 0x30]
and eax, 0xffff
push eax
push esi
call fcn.00407926
add esp, 0x10
push edi
call fcn.00407950
mov eax, dword [esi + 0x18]
pop ecx
test eax, eax
jle 0x4078fd
neg eax
mov dword [esi + 0x18], eax
xor eax, eax
cmp dword [esi + 0x14], eax
sete al
jmp 0x407921
cmp dword [edi + 0x10], 0
jne 0x407821
jmp 0x4077cf
mov eax, dword [0x41c5b4]
mov dword [edi + 0x18], eax
push 0xfffffffffffffffe
pop eax
pop edi
pop esi
pop ebx
leave
ret