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

Disassembly:
sub esp, 0x58
mov eax, dword [0x47b5b0]
xor eax, esp
mov dword [esp + 0x54], eax
push edi
mov eax, 0x10
mov word [esp + 0x30], ax
mov ecx, 0x11
mov word [esp + 0x32], cx
xor ecx, ecx
mov eax, 0x12
mov word [esp + 0x34], ax
mov word [esp + 0x36], cx
mov eax, 8
mov word [esp + 0x38], ax
mov ecx, 7
mov word [esp + 0x3a], cx
mov eax, 9
mov word [esp + 0x3c], ax
mov ecx, 6
mov word [esp + 0x3e], cx
mov eax, 0xa
mov word [esp + 0x40], ax
mov ecx, 5
mov word [esp + 0x42], cx
mov eax, 0xb
mov word [esp + 0x44], ax
mov ecx, 4
mov eax, 0xc
mov word [esp + 0x46], cx
mov word [esp + 0x48], ax
mov ecx, 3
mov eax, 0xd
mov word [esp + 0x4a], cx
mov word [esp + 0x4c], ax
mov ecx, 2
mov eax, 0xe
mov word [esp + 0x4e], cx
mov word [esp + 0x50], ax
mov ecx, 1
mov eax, 0xf
mov dword [esp + 0x1c], edx
mov word [esp + 0x52], cx
mov word [esp + 0x54], ax
test edx, edx
je 0x41036b
mov edi, dword [edx + 0xc]
test edi, edi
je 0x41036b
cmp dword [edx + 0x14], 0
je 0x41036b
cmp dword [edx + 0x10], 0
jne 0x40f44b
cmp dword [edx + 0x18], 0
jne 0x41036b
cmp dword [edi], 0xb
jne 0x40f456
mov dword [edi], 0xc
mov ecx, dword [edx + 0x14]
mov eax, dword [edx + 0x18]
mov dword [esp + 0x18], ecx
mov ecx, dword [edx + 0x1c]
push ebx
mov ebx, dword [edi + 0x203c]
push ebp
mov ebp, dword [edx + 0x10]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x28], ecx
mov ecx, dword [edi]
push esi
mov esi, dword [edi + 0x2040]
mov dword [esp + 0x14], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x30], 0
cmp ecx, 0x1c
jbe switch.0x0040f4b4
mov eax, 0xfffffffe
pop esi
pop ebp
pop ebx
pop edi
mov ecx, dword [esp + 0x54]
xor ecx, esp
call fcn.00431fec
add esp, 0x58
ret
mov edx, dword [esp + 0x28]
jmp dword [ecx*4 + 0x410380]
cmp dword [edi + 8], 0
jne 0x40f4cc
mov dword [edi], 0xc
jmp 0x4101f2
cmp esi, 0x10
jae 0x40f4f1
test eax, eax
je 0x410256
movzx edx, byte [ebp]
mov ecx, esi
shl edx, cl
dec eax
add esi, 8
inc ebp
add ebx, edx
mov dword [esp + 0x14], eax
cmp esi, 0x10
jb 0x40f4d1
movzx eax, bl
shl eax, 8
mov ecx, ebx
shr ecx, 8
add eax, ecx
xor edx, edx
mov ecx, 0x1f
div ecx
test edx, edx
je 0x40f514
mov eax, dword [esp + 0x14]
jmp 0x4101ec
mov edx, ebx
and dl, 0xf
cmp dl, 8
je 0x40f527
mov eax, dword [esp + 0x14]
jmp 0x4101ec
shr ebx, 4
mov ecx, ebx
and ecx, 0xf
add ecx, 8
sub esi, 4
cmp ecx, dword [edi + 0x2028]
jbe 0x40f546
mov eax, dword [esp + 0x14]
jmp 0x4101ec
mov eax, 1
shl eax, cl
xor edx, edx
xor ecx, ecx
mov dword [edi + 0x201c], eax
xor eax, eax
call fcn.00412090
mov ecx, dword [esp + 0x28]
shr ebx, 8
not ebx
and ebx, 2
or ebx, 9
mov dword [edi + 0x2020], eax
mov dword [ecx + 0x28], eax
mov eax, dword [esp + 0x14]
mov dword [edi], ebx
xor ebx, ebx
xor esi, esi
jmp 0x4101f2
cmp esi, 0x20
jae 0x40f5b0
lea ebx, [ebx]
test eax, eax
je 0x410256
movzx edx, byte [ebp]
mov ecx, esi
shl edx, cl
dec eax
add esi, 8
inc ebp
add ebx, edx
mov dword [esp + 0x14], eax
cmp esi, 0x20
jb 0x40f590
mov ecx, ebx
shl ecx, 0x10
mov edx, ebx
and edx, 0xff00
add ecx, edx
mov edx, ebx
shr edx, 8
shl ecx, 8
and edx, 0xff00
add ecx, edx
mov edx, dword [esp + 0x28]
shr ebx, 0x18
add ecx, ebx
mov dword [edi + 0x2020], ecx
mov dword [edx + 0x28], ecx
xor ebx, ebx
xor esi, esi
mov dword [edi], 0xa
cmp dword [edi + 0xc], 0
je 0x410202
xor eax, eax
xor edx, edx
xor ecx, ecx
call fcn.00412090
mov ecx, dword [esp + 0x28]
mov dword [edi + 0x2020], eax
mov dword [ecx + 0x28], eax
mov eax, dword [esp + 0x14]
mov dword [edi], 0xb
cmp dword [edi + 4], 0
je 0x40f631
mov ecx, esi
and ecx, 7
shr ebx, cl
sub esi, ecx
mov dword [edi], 0x18
jmp 0x4101f2
cmp esi, 3
jae 0x40f656
test eax, eax
je 0x410256
movzx edx, byte [ebp]
mov ecx, esi
shl edx, cl
dec eax
add esi, 8
inc ebp
add ebx, edx
mov dword [esp + 0x14], eax
cmp esi, 3
jb 0x40f636
mov ecx, ebx
and ecx, 1
shr ebx, 1
mov dword [edi + 4], ecx
mov ecx, ebx
and ecx, 3
dec esi
cmp ecx, 3
ja case.default.0x40f66b
jmp dword [ecx*4 + 0x4103f4]
shr ebx, 2
mov dword [edi], 0xd
sub esi, 2
jmp 0x4101f2
shr ebx, 2
mov dword [edi + 0x2014], 0x4663e0
mov dword [edi + 0x2050], 9
mov dword [edi + 0x2018], 0x466be0
mov dword [edi + 0x2054], 5
mov dword [edi], 0x12
sub esi, 2
jmp 0x4101f2
shr ebx, 2
mov dword [edi], 0xf
sub esi, 2
jmp 0x4101f2
mov dword [edi], 0x1b
shr ebx, 2
sub esi, 2
jmp 0x4101f2
mov ecx, esi
and ecx, 7
sub esi, ecx
shr ebx, cl
cmp esi, 0x20
jae 0x40f710
lea esp, [esp]
test eax, eax
je 0x410256
movzx edx, byte [ebp]
mov ecx, esi
shl edx, cl
dec eax
add esi, 8
inc ebp
add ebx, edx
mov dword [esp + 0x14], eax
cmp esi, 0x20
jb 0x40f6f0
mov edx, ebx
mov ecx, ebx
not edx
and ecx, 0xffff
shr edx, 0x10
cmp ecx, edx
jne 0x4101ec
xor ebx, ebx
mov dword [edi + 0x2044], ecx
xor esi, esi
mov dword [edi], 0xe
mov ecx, dword [edi + 0x2044]
mov dword [esp + 0x10], ecx
test ecx, ecx
je 0x40fdf0
cmp ecx, eax
jbe 0x40f753
mov ecx, eax
mov dword [esp + 0x10], eax
mov edx, dword [esp + 0x1c]
cmp ecx, edx
jbe 0x40f761
mov ecx, edx
mov dword [esp + 0x10], ecx
test ecx, ecx
je 0x410256
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x24]
push eax
push ebp
push ecx
call fcn.004377c0
mov eax, dword [esp + 0x1c]
sub dword [esp + 0x20], eax
sub dword [esp + 0x28], eax
add dword [esp + 0x30], eax
add ebp, eax
add esp, 0xc
sub dword [edi + 0x2044], eax
mov eax, dword [esp + 0x14]
jmp 0x4101f2
cmp esi, 0xe
jae 0x40f7c2
test eax, eax
je 0x410256
movzx edx, byte [ebp]
mov ecx, esi
shl edx, cl
dec eax
add esi, 8
inc ebp
add ebx, edx
mov dword [esp + 0x14], eax
cmp esi, 0xe
jb 0x40f7a2
mov ecx, ebx
and ecx, 0x1f
shr ebx, 5
add ecx, 0x101
mov edx, ebx
shr ebx, 5
mov dword [edi + 0x205c], ecx
mov ecx, ebx
and edx, 0x1f
and ecx, 0xf
inc edx
add ecx, 4
shr ebx, 4
mov dword [edi + 0x2060], edx
mov dword [edi + 0x2058], ecx
sub esi, 0xe
mov dword [edi + 0x2064], 0
mov dword [edi], 0x10
mov edx, dword [edi + 0x2064]
cmp edx, dword [edi + 0x2058]
jae 0x40f872
cmp esi, 3
jae 0x40f840
lea esp, [esp]
test eax, eax
je 0x410256
movzx edx, byte [ebp]
mov ecx, esi
shl edx, cl
dec eax
add esi, 8
inc ebp
add ebx, edx
mov dword [esp + 0x14], eax
cmp esi, 3
jb 0x40f820
mov edx, dword [edi + 0x2064]
movzx edx, word [esp + edx*2 + 0x3c]
mov ecx, ebx
and ecx, 7
mov word [edi + edx*2 + 0x2068], cx
inc dword [edi + 0x2064]
mov ecx, dword [edi + 0x2064]
shr ebx, 3
sub esi, 3
cmp ecx, dword [edi + 0x2058]
jb 0x40f817
mov eax, 0x13
cmp dword [edi + 0x2064], eax
jae 0x40f8a3
nop
mov edx, dword [edi + 0x2064]
movzx ecx, word [esp + edx*2 + 0x3c]
xor edx, edx
mov word [edi + ecx*2 + 0x2068], dx
inc dword [edi + 0x2064]
cmp dword [edi + 0x2064], eax
jb 0x40f880
lea eax, [edi + 0x14]
lea ecx, [edi + 0x10]
mov dword [ecx], eax
mov dword [edi + 0x2014], eax
lea eax, [edi + 0x22e8]
push eax
push ecx
lea ecx, [edi + 0x2068]
push ecx
lea edx, [edi + 0x2050]
push 0
mov ecx, 0x13
mov dword [edx], 7
call fcn.00412750
add esp, 0x10
mov dword [esp + 0x30], eax
test eax, eax
mov eax, dword [esp + 0x14]
jne 0x4101ec
mov dword [edi + 0x2064], 0
mov dword [edi], 0x11
mov edx, dword [edi + 0x2060]
add edx, dword [edi + 0x205c]
cmp dword [edi + 0x2064], edx
jae 0x40fb67
mov ecx, dword [edi + 0x2050]
mov edx, 1
shl edx, cl
mov ecx, dword [edi + 0x2014]
dec edx
and edx, ebx
mov ecx, dword [ecx + edx*4]
mov edx, ecx
shr edx, 8
movzx edx, dl
mov dword [esp + 0x10], ecx
cmp edx, esi
jbe 0x40f984
lea esp, [esp]
test eax, eax
je 0x410256
movzx edx, byte [ebp]
mov ecx, esi
shl edx, cl
mov ecx, dword [edi + 0x2050]
dec eax
add esi, 8
add ebx, edx
mov edx, 1
shl edx, cl
mov ecx, dword [edi + 0x2014]
inc ebp
mov dword [esp + 0x14], eax
dec edx
and edx, ebx
mov ecx, dword [ecx + edx*4]
mov edx, ecx
shr edx, 8
movzx edx, dl
mov dword [esp + 0x10], ecx
cmp edx, esi
ja 0x40f940
mov edx, ecx
shr edx, 0x10
cmp edx, 0x10
jae 0x40f9eb
mov edx, ecx
shr edx, 8
movzx edx, dl
cmp esi, edx
jae 0x40f9c6
lea ebx, [ebx]
test eax, eax
je 0x410256
movzx edx, byte [ebp]
mov ecx, esi
shl edx, cl
mov ecx, dword [esp + 0x10]
dec eax
add esi, 8
add ebx, edx
movzx edx, ch
inc ebp
mov dword [esp + 0x14], eax
cmp esi, edx
jb 0x40f9a0
mov dx, word [esp + 0x12]
movzx ecx, ch
shr ebx, cl
sub esi, ecx
mov ecx, dword [edi + 0x2064]
mov word [edi + ecx*2 + 0x2068], dx
inc dword [edi + 0x2064]
jmp 0x40fb4f
mov dx, word [esp + 0x12]
movzx ecx, ch
mov dword [esp + 0x18], ecx
cmp dx, 0x10
jne 0x40fa5f
lea edx, [ecx + 2]
cmp esi, edx
jae 0x40fa2a
test eax, eax
je 0x410256
movzx edx, byte [ebp]
mov ecx, esi
shl edx, cl
mov ecx, dword [esp + 0x18]
dec eax
add esi, 8
add ebx, edx
lea edx, [ecx + 2]
inc ebp
mov dword [esp + 0x14], eax
cmp esi, edx
jb 0x40fa04
shr ebx, cl
sub esi, ecx
mov ecx, dword [edi + 0x2064]
test ecx, ecx
je 0x4101ec
movzx ecx, word [edi + ecx*2 + 0x2066]
mov dword [esp + 0x18], ecx
mov ecx, ebx
and ecx, 3
add ecx, 3
shr ebx, 2
mov dword [esp + 0x10], ecx
sub esi, 2
jmp 0x40fb01
cmp dx, 0x11
jne 0x40faae
lea edx, [ecx + 3]
cmp esi, edx
jae 0x40fa96
lea esp, [esp]
test eax, eax
je 0x410256
movzx edx, byte [ebp]
mov ecx, esi
shl edx, cl
mov ecx, dword [esp + 0x18]
dec eax
add esi, 8
add ebx, edx
lea edx, [ecx + 3]
inc ebp
mov dword [esp + 0x14], eax
cmp esi, edx
jb 0x40fa70
shr ebx, cl
mov edx, ebx
and edx, 7
add edx, 3
mov dword [esp + 0x10], edx
shr ebx, 3
mov edx, 0xfffffffd
jmp 0x40faf1
lea edx, [ecx + 7]
cmp esi, edx
jae 0x40fadb
test eax, eax
je 0x410256
movzx edx, byte [ebp]
mov ecx, esi
shl edx, cl
mov ecx, dword [esp + 0x18]
dec eax
add esi, 8
add ebx, edx
lea edx, [ecx + 7]
inc ebp
mov dword [esp + 0x14], eax
cmp esi, edx
jb 0x40fab5
shr ebx, cl
mov edx, ebx
and edx, 0x7f
add edx, 0xb
mov dword [esp + 0x10], edx
shr ebx, 7
mov edx, 0xfffffff9
sub edx, ecx
mov ecx, dword [esp + 0x10]
add esi, edx
mov dword [esp + 0x18], 0
mov edx, dword [edi + 0x2064]
add edx, ecx
mov ecx, dword [edi + 0x2060]
add ecx, dword [edi + 0x205c]
cmp edx, ecx
ja 0x4101ec
cmp dword [esp + 0x10], 0
je 0x40fb4f
mov ecx, dword [esp + 0x18]
jmp 0x40fb30
mov edx, dword [edi + 0x2064]
dec dword [esp + 0x10]
mov word [edi + edx*2 + 0x2068], cx
inc dword [edi + 0x2064]
cmp dword [esp + 0x10], 0
jne 0x40fb30
mov ecx, dword [edi + 0x2060]
add ecx, dword [edi + 0x205c]
cmp dword [edi + 0x2064], ecx
jb 0x40f913
cmp dword [edi], 0x1b
je 0x4101f2
lea eax, [edi + 0x14]
lea ecx, [edi + 0x10]
mov dword [ecx], eax
mov dword [edi + 0x2014], eax
lea eax, [edi + 0x22e8]
push eax
push ecx
mov ecx, dword [edi + 0x205c]
lea eax, [edi + 0x2068]
push eax
lea edx, [edi + 0x2050]
push 1
mov dword [edx], 9
call fcn.00412750
add esp, 0x10
mov dword [esp + 0x30], eax
test eax, eax
je 0x40fbba
mov eax, dword [esp + 0x14]
jmp 0x4101ec
mov ecx, dword [edi + 0x10]
lea eax, [edi + 0x10]
mov dword [edi + 0x2018], ecx
lea ecx, [edi + 0x22e8]
push ecx
push eax
mov eax, dword [edi + 0x205c]
lea ecx, [edi + eax*2 + 0x2068]
push ecx
mov ecx, dword [edi + 0x2060]
lea edx, [edi + 0x2054]
push 2
mov dword [edx], 6
call fcn.00412750
add esp, 0x10
mov dword [esp + 0x30], eax
test eax, eax
mov eax, dword [esp + 0x14]
jne 0x4101ec
mov dword [edi], 0x12
cmp eax, 6
jb 0x40fc82
cmp dword [esp + 0x1c], 0x102
jb 0x40fc82
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x24]
mov dword [eax + 0x1c], ecx
mov ecx, dword [esp + 0x2c]
mov dword [eax + 0x14], edx
mov edx, dword [esp + 0x14]
push ecx
mov dword [eax + 0x10], ebp
mov dword [eax + 0x18], edx
push eax
mov dword [edi + 0x203c], ebx
mov dword [edi + 0x2040], esi
call fcn.004122f0
mov eax, dword [esp + 0x30]
mov edx, dword [eax + 0x14]
mov ecx, dword [eax + 0x1c]
mov ebp, dword [eax + 0x10]
mov ebx, dword [edi + 0x203c]
mov esi, dword [edi + 0x2040]
mov dword [esp + 0x2c], edx
mov edx, dword [eax + 0x18]
add esp, 8
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x14], edx
mov eax, edx
jmp 0x4101f2
mov ecx, dword [edi + 0x2050]
mov edx, 1
shl edx, cl
mov ecx, dword [edi + 0x2014]
dec edx
and edx, ebx
mov edx, dword [ecx + edx*4]
mov ecx, edx
shr ecx, 8
movzx ecx, cl
mov dword [esp + 0x10], edx
cmp ecx, esi
jbe 0x40fcf4
jmp 0x40fcb0
test eax, eax
je 0x410256
movzx edx, byte [ebp]
mov ecx, esi
shl edx, cl
mov ecx, dword [edi + 0x2050]
dec eax
add esi, 8
add ebx, edx
mov edx, 1
shl edx, cl
mov ecx, dword [edi + 0x2014]
inc ebp
mov dword [esp + 0x14], eax
dec edx
and edx, ebx
mov edx, dword [ecx + edx*4]
mov ecx, edx
shr ecx, 8
movzx ecx, cl
mov dword [esp + 0x10], edx
cmp ecx, esi
ja 0x40fcb0
test dl, dl
je 0x40fdc1
test dl, 0xf0
jne 0x40fdc1
mov ecx, edx
shr ecx, 8
mov dword [esp + 0x34], ecx
movzx ecx, cl
mov dword [esp + 0x20], ecx
movzx ecx, dl
add ecx, dword [esp + 0x20]
mov dword [esp + 0x18], edx
mov edx, 1
shl edx, cl
mov ecx, dword [esp + 0x20]
dec edx
and edx, ebx
shr edx, cl
mov ecx, dword [esp + 0x10]
shr ecx, 0x10
add edx, ecx
mov ecx, dword [edi + 0x2014]
mov ecx, dword [ecx + edx*4]
mov dword [esp + 0x10], ecx
shr ecx, 8
movzx edx, cl
movzx ecx, byte [esp + 0x34]
add edx, ecx
cmp edx, esi
jbe 0x40fdb4
test eax, eax
je 0x410256
movzx edx, byte [ebp]
mov ecx, esi
shl edx, cl
mov ecx, dword [esp + 0x18]
dec eax
add esi, 8
add ebx, edx
movzx edx, ch
movzx ecx, cl
add ecx, edx
mov dword [esp + 0x20], edx
mov edx, 1
shl edx, cl
mov ecx, dword [esp + 0x20]
inc ebp
mov dword [esp + 0x14], eax
dec edx
and edx, ebx
shr edx, cl
movzx ecx, word [esp + 0x1a]
add edx, ecx
mov ecx, dword [edi + 0x2014]
mov ecx, dword [ecx + edx*4]
mov dword [esp + 0x10], ecx
shr ecx, 8
movzx edx, cl
add edx, dword [esp + 0x20]
cmp edx, esi
ja 0x40fd57
movzx ecx, byte [esp + 0x19]
mov edx, dword [esp + 0x10]
shr ebx, cl
sub esi, ecx
mov ecx, edx
shr ecx, 8
movzx ecx, cl
shr ebx, cl
sub esi, ecx
mov dword [esp + 0x20], ecx
mov ecx, edx
shr ecx, 0x10
mov dword [edi + 0x2044], ecx
test dl, dl
jne 0x40fdeb
mov dword [edi], 0x17
jmp 0x4101f2
test dl, 0x20
je 0x40fdfb
mov dword [edi], 0xb
jmp 0x4101f2
test dl, 0x40
jne 0x4101ec
movzx edx, dl
and edx, 0xf
mov dword [edi + 0x204c], edx
mov dword [edi], 0x13
mov ecx, dword [edi + 0x204c]
test ecx, ecx
je 0x40fe61
cmp esi, ecx
jae 0x40fe47
test eax, eax
je 0x410256
movzx edx, byte [ebp]
mov ecx, esi
shl edx, cl
dec eax
add esi, 8
inc ebp
add ebx, edx
mov dword [esp + 0x14], eax
cmp esi, dword [edi + 0x204c]
jb 0x40fe24
mov ecx, dword [edi + 0x204c]
mov edx, 1
shl edx, cl
dec edx
and edx, ebx
add dword [edi + 0x2044], edx
shr ebx, cl
sub esi, ecx
mov dword [edi], 0x14
mov ecx, dword [edi + 0x2054]
mov edx, 1
shl edx, cl
mov ecx, dword [edi + 0x2018]
dec edx
and edx, ebx
mov edx, dword [ecx + edx*4]
mov ecx, edx
shr ecx, 8
movzx ecx, cl
mov dword [esp + 0x10], edx
cmp ecx, esi
jbe 0x40fed4
test eax, eax
je 0x410256
movzx edx, byte [ebp]
mov ecx, esi
shl edx, cl
mov ecx, dword [edi + 0x2054]
dec eax
add esi, 8
add ebx, edx
mov edx, 1
shl edx, cl
mov ecx, dword [edi + 0x2018]
inc ebp
mov dword [esp + 0x14], eax
dec edx
and edx, ebx
mov edx, dword [ecx + edx*4]
mov ecx, edx
shr ecx, 8
movzx ecx, cl
mov dword [esp + 0x10], edx
cmp ecx, esi
ja 0x40fe90
test dl, 0xf0
jne 0x40ff9a
mov ecx, edx
shr ecx, 8
mov dword [esp + 0x34], ecx
movzx ecx, cl
mov dword [esp + 0x20], ecx
movzx ecx, dl
add ecx, dword [esp + 0x20]
mov dword [esp + 0x18], edx
mov edx, 1
shl edx, cl
mov ecx, dword [esp + 0x20]
dec edx
and edx, ebx
shr edx, cl
mov ecx, dword [esp + 0x10]
shr ecx, 0x10
add edx, ecx
mov ecx, dword [edi + 0x2018]
mov ecx, dword [ecx + edx*4]
mov dword [esp + 0x10], ecx
shr ecx, 8
movzx edx, cl
movzx ecx, byte [esp + 0x34]
add edx, ecx
cmp edx, esi
jbe 0x40ff8d
nop
test eax, eax
je 0x410256
movzx edx, byte [ebp]
mov ecx, esi
shl edx, cl
mov ecx, dword [esp + 0x18]
dec eax
add esi, 8
add ebx, edx
movzx edx, ch
movzx ecx, cl
add ecx, edx
mov dword [esp + 0x20], edx
mov edx, 1
shl edx, cl
mov ecx, dword [esp + 0x20]
inc ebp
mov dword [esp + 0x14], eax
dec edx
and edx, ebx
shr edx, cl
movzx ecx, word [esp + 0x1a]
add edx, ecx
mov ecx, dword [edi + 0x2018]
mov ecx, dword [ecx + edx*4]
mov dword [esp + 0x10], ecx
shr ecx, 8
movzx edx, cl
add edx, dword [esp + 0x20]
cmp edx, esi
ja 0x40ff30
movzx ecx, byte [esp + 0x19]
mov edx, dword [esp + 0x10]
shr ebx, cl
sub esi, ecx
mov ecx, edx
shr ecx, 8
movzx ecx, cl
shr ebx, cl
sub esi, ecx
mov dword [esp + 0x20], ecx
test dl, 0x40
jne 0x4101ec
mov ecx, edx
movzx edx, dl
shr ecx, 0x10
and edx, 0xf
mov dword [edi + 0x2048], ecx
mov dword [edi + 0x204c], edx
mov dword [edi], 0x15
mov ecx, dword [edi + 0x204c]
test ecx, ecx
je 0x41001d
cmp esi, ecx
jae 0x410003
mov edi, edi
test eax, eax
je 0x410256
movzx edx, byte [ebp]
mov ecx, esi
shl edx, cl
dec eax
add esi, 8
inc ebp
add ebx, edx
mov dword [esp + 0x14], eax
cmp esi, dword [edi + 0x204c]
jb 0x40ffe0
mov ecx, dword [edi + 0x204c]
mov edx, 1
shl edx, cl
dec edx
and edx, ebx
add dword [edi + 0x2048], edx
shr ebx, cl
sub esi, ecx
mov ecx, dword [edi + 0x2030]
sub ecx, dword [esp + 0x1c]
add ecx, dword [esp + 0x2c]
cmp dword [edi + 0x2048], ecx
ja 0x4101ec
mov dword [edi], 0x16
cmp dword [esp + 0x1c], 0
je 0x410256
mov edx, dword [esp + 0x2c]
sub edx, dword [esp + 0x1c]
mov ecx, dword [edi + 0x2048]
cmp ecx, edx
jbe 0x4100a8
sub ecx, edx
mov edx, dword [edi + 0x2034]
mov dword [esp + 0x10], ecx
cmp ecx, edx
jbe 0x410080
sub ecx, edx
mov edx, dword [edi + 0x2038]
add edx, dword [edi + 0x202c]
mov dword [esp + 0x10], ecx
sub edx, ecx
jmp 0x410092
mov edx, dword [edi + 0x2038]
sub edx, ecx
add edx, dword [edi + 0x2034]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x18], edx
mov edx, dword [edi + 0x2044]
mov dword [esp + 0x34], edx
cmp ecx, edx
jbe 0x4100c0
mov ecx, edx
jmp 0x4100bc
mov edx, dword [esp + 0x24]
sub edx, ecx
mov ecx, dword [edi + 0x2044]
mov dword [esp + 0x18], edx
mov dword [esp + 0x34], ecx
mov dword [esp + 0x10], ecx
mov edx, dword [esp + 0x1c]
cmp ecx, edx
jbe 0x4100ce
mov ecx, edx
mov dword [esp + 0x10], ecx
sub edx, ecx
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0x34]
sub edx, ecx
mov dword [edi + 0x2044], edx
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x24]
mov dl, byte [edx]
mov byte [ecx], dl
mov edx, 1
add dword [esp + 0x18], edx
add ecx, edx
sub dword [esp + 0x10], edx
mov dword [esp + 0x24], ecx
jne 0x4100e0
cmp dword [edi + 0x2044], 0
jne 0x4101f2
mov dword [edi], 0x12
jmp 0x4101f2
cmp dword [esp + 0x1c], 0
je 0x410256
mov ecx, dword [esp + 0x24]
mov dl, byte [edi + 0x2044]
mov byte [ecx], dl
inc ecx
dec dword [esp + 0x1c]
mov dword [esp + 0x24], ecx
mov dword [edi], 0x12
jmp 0x4101f2
cmp dword [edi + 8], 0
je 0x41023e
cmp esi, 0x20
jae 0x410173
test eax, eax
je 0x410256
movzx edx, byte [ebp]
mov ecx, esi
shl edx, cl
dec eax
add esi, 8
inc ebp
add ebx, edx
mov dword [esp + 0x14], eax
cmp esi, 0x20
jb 0x410153
mov edx, dword [esp + 0x2c]
sub edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x28]
add dword [ecx + 0x24], edx
add dword [edi + 0x2024], edx
mov dword [esp + 0x2c], edx
test edx, edx
je 0x4101b6
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x24]
mov ecx, dword [edi + 0x2020]
sub edx, eax
call fcn.00412090
mov ecx, dword [esp + 0x28]
mov dword [edi + 0x2020], eax
mov dword [ecx + 0x28], eax
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x2c], edx
mov ecx, ebx
shl ecx, 0x10
mov edx, ebx
and edx, 0xff00
add ecx, edx
mov edx, ebx
shr edx, 8
and edx, 0xff00
shl ecx, 8
add ecx, edx
mov edx, ebx
shr edx, 0x18
add ecx, edx
cmp ecx, dword [edi + 0x2020]
je 0x41023a
mov dword [edi], 0x1b
mov ecx, dword [edi]
cmp ecx, 0x1c
jbe 0x40f4b0
jmp case.0x40f4b4.1
mov ecx, dword [esp + 0x24]
mov dword [edx + 0x14], ecx
mov ecx, dword [esp + 0x1c]
mov dword [edx + 0x10], ebp
mov dword [edx + 0x18], eax
mov dword [edx + 0x1c], ecx
mov dword [edi + 0x2040], esi
pop esi
pop ebp
mov dword [edi + 0x203c], ebx
pop ebx
mov eax, 2
pop edi
mov ecx, dword [esp + 0x54]
xor ecx, esp
call fcn.00431fec
add esp, 0x58
ret
xor ebx, ebx
xor esi, esi
mov dword [edi], 0x1a
mov dword [esp + 0x30], 1
jmp 0x410256
mov dword [esp + 0x30], 0xfffffffd
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x24]
mov dword [ecx + 0x14], edx
mov edx, dword [esp + 0x1c]
mov dword [ecx + 0x1c], edx
mov dword [ecx + 0x10], ebp
mov dword [ecx + 0x18], eax
cmp dword [edi + 0x202c], 0
mov dword [edi + 0x203c], ebx
mov dword [edi + 0x2040], esi
jne 0x410291
cmp dword [edi], 0x18
jge 0x4102c4
mov eax, dword [esp + 0x2c]
cmp eax, dword [ecx + 0x1c]
je 0x4102c4
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x2c]
push edx
call fcn.0040f210
add esp, 4
test eax, eax
je 0x4102c4
mov dword [edi], 0x1c
pop esi
pop ebp
pop ebx
mov eax, 0xfffffffc
pop edi
mov ecx, dword [esp + 0x54]
xor ecx, esp
call fcn.00431fec
add esp, 0x58
ret
mov esi, dword [esp + 0x28]
mov ebp, dword [esp + 0x38]
sub ebp, dword [esi + 0x18]
mov ebx, dword [esp + 0x2c]
sub ebx, dword [esi + 0x1c]
add dword [esi + 0x20], ebp
add dword [esi + 0x24], ebx
add dword [edi + 0x2024], ebx
cmp dword [edi + 8], 0
je 0x410307
test ebx, ebx
je 0x410307
mov edx, dword [esi + 0x14]
mov ecx, dword [edi + 0x2020]
sub edx, ebx
mov eax, ebx
call fcn.00412090
mov dword [edi + 0x2020], eax
mov dword [esi + 0x28], eax
mov eax, dword [edi + 4]
neg eax
sbb eax, eax
and eax, 0x40
xor ecx, ecx
cmp dword [edi], 0xb
setne cl
dec ecx
and ecx, 0x80
add eax, ecx
add eax, dword [edi + 0x2040]
mov dword [esi], eax
test ebp, ebp
jne 0x410354
test ebx, ebx
jne 0x410354
mov eax, dword [esp + 0x30]
test eax, eax
jne 0x40f499
pop esi
lea eax, [ebp - 5]
pop ebp
pop ebx
pop edi
mov ecx, dword [esp + 0x54]
xor ecx, esp
call fcn.00431fec
add esp, 0x58
ret
mov eax, dword [esp + 0x30]
pop esi
pop ebp
pop ebx
pop edi
mov ecx, dword [esp + 0x54]
xor ecx, esp
call fcn.00431fec
add esp, 0x58
ret
mov ecx, dword [esp + 0x58]
pop edi
xor ecx, esp
mov eax, 0xfffffffe
call fcn.00431fec
add esp, 0x58
ret