Function at 0x815bf0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x74
mov esi, dword [0xbd33e0]
mov ebp, ecx
mov ecx, dword [esp + 0x8c]
movzx eax, word [esp + 0x94]
xor esi, esp
test ecx, ecx
mov dword [esp + 0x70], esi
mov edi, dword [ebp]
mov esi, dword [ebp + 8]
mov dword [esp + 0x6c], 0
mov dword [esp + 0x68], 0
mov dword [esp + 0x64], 0
mov dword [esp + 0x60], 0
mov dword [esp + 0x5c], 0
mov dword [esp + 0x58], 0
mov dword [esp + 0x54], 0
mov dword [esp + 0x30], esi
jne 0x815c5e
xor esi, esi
jmp 0x815c66
xor esi, esi
cmp dword [ecx], 0x3f
cmovle esi, ecx
mov ecx, eax
mov dword [esp + 0x5c], esi
and ecx, 0xfffffeff
test byte [edi + 0x4c], 0x10
mov ebx, dword [edx]
cmove ecx, eax
cmp ebx, 0x41
jl 0x815e91
mov edx, 0x994de4
xor eax, eax
movzx esi, byte [0xbb9c83]
imul edx, edx
and edx, 3
cmp edx, 3
sete al
mov ecx, eax
not ecx
lea eax, [eax + ecx*2 + 4]
and al, 7
movzx eax, al
bt esi, eax
jb 0x815e7c
mov al, byte [0xbb9c83]
xor ecx, ecx
cmp edx, 3
mov ah, 1
sete cl
mov ebx, ecx
not ebx
lea ecx, [ecx + ebx*2 + 4]
and cl, 7
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbb9c83], ah
jne 0x815cb9
mov ecx, 0x994de4
xor edx, edx
movzx eax, al
imul ecx, ecx
and ecx, 3
cmp ecx, 3
sete dl
mov ebx, edx
not ebx
lea edx, [edx + ebx*2 + 4]
and dl, 7
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x815d31
xor eax, eax
cmp ecx, 3
movzx esi, byte [0xbb9c83]
sete al
mov edx, eax
not edx
lea eax, [eax + edx*2 + 4]
and al, 7
movzx eax, al
bt esi, eax
jae 0x815d0b
jmp 0x815e7c
xor eax, eax
cmp ecx, 3
movzx edx, byte [0xbb9c83]
sete al
mov ecx, eax
not ecx
lea eax, [eax + ecx*2 + 4]
and al, 7
movzx eax, al
bt edx, eax
jb 0x815e51
mov ecx, 0x994de4
xor eax, eax
imul ecx, ecx
and ecx, 3
cmp ecx, 3
sete al
mov ecx, eax
not ecx
and ecx, 0x883
lea ecx, [eax + ecx*2 - 0x606cac84]
mov eax, dword [0xbb9c60]
mov edx, ecx
shr edx, 0x1f
or edx, ecx
xor eax, ecx
and cl, 7
mov dword [0xbb9c60], eax
not eax
imul edx, eax
mov eax, dword [0xbb9c64]
lea esi, [edx + edx]
xor eax, edx
shr edx, 0x1e
mov dword [0xbb9c64], eax
or esi, edx
not eax
mov edx, dword [0xbb9c68]
imul eax, esi
lea esi, [eax*4]
xor edx, eax
shr eax, 0x1d
mov dword [0xbb9c68], edx
or esi, eax
not edx
mov eax, dword [0xbb9c6c]
imul edx, esi
lea esi, [edx*8]
xor eax, edx
shr edx, 0x1c
mov dword [0xbb9c6c], eax
or esi, edx
not eax
mov edx, dword [0xbb9c70]
imul eax, esi
mov esi, eax
shl esi, 4
xor edx, eax
shr eax, 0x1b
mov dword [0xbb9c70], edx
or eax, esi
not edx
mov edi, dword [0xbb9c74]
imul edx, eax
mov esi, edx
shl esi, 5
xor edi, edx
shr edx, 0x1a
mov dword [0xbb9c74], edi
or edx, esi
not edi
imul edi, edx
mov edx, dword [0xbb9c78]
mov esi, edi
shl esi, 6
xor edx, edi
shr edi, 0x19
mov dword [0xbb9c78], edx
or edi, esi
not edx
imul edx, edi
xor dword [0xbb9c7c], edx
mov dl, 1
shl dl, cl
or byte [0xbb9c83], dl
mov eax, 0x994de4
xor ecx, ecx
imul eax, eax
and eax, 3
cmp eax, 3
sete cl
mov eax, ecx
not eax
lea ecx, [ecx + eax*2 + 4]
mov al, 0xfe
and cl, 7
xor cl, 7
rol al, cl
and byte [0xbb9c83], al
push 0x40
push 0xbb9c60
push ebp
call fcn.0078de60
add esp, 0xc
jmp 0x816a26
mov dword [esp + 0xc], ebp
movzx ebp, cx
mov eax, 1
mov dword [esp + 8], esi
mov dword [esp + 4], edx
mov dword [esp + 0x1c], ecx
mov ecx, edi
mov dword [esp + 0x10], ebp
and ebp, 0x20
cmovne ebx, eax
imul eax, ebx, 0x58
lea esi, [eax + 0x2f7]
mov dword [esp + 0x34], eax
and esi, 0xfffffff8
lea edx, [esi + 0x48]
push 0
call fcn.007995d0
add esp, 4
cmp byte [edi + 0x51], 0
mov edx, ebx
mov ebx, eax
je 0x815eea
mov ecx, edi
mov edx, ebx
call fcn.00780810
jmp 0x816a26
mov dword [esp + 0x50], ebp
mov ebp, dword [esp + 0xc]
mov eax, dword [esp + 4]
mov ecx, dword [esp + 0x88]
mov dword [esp + 0x18], edi
mov edi, dword [esp + 0x90]
mov dword [esp + 0x2c], edx
mov dword [ebx], ebp
mov dword [ebx + 4], eax
mov eax, dword [esp + 8]
mov dword [ebx + 8], eax
mov dword [ebx + 0x10], ecx
mov ecx, ebp
mov dword [ebx + 0xc], edi
mov dword [ebx + 0x18], 0xffffffff
mov dword [ebx + 0x14], 0xffffffff
mov byte [ebx + 0x2c], dl
call fcn.007fb640
mov dword [ebx + 0x1c], eax
mov dword [ebx + 0x20], eax
mov eax, dword [esp + 0x1c]
lea edi, [ebx + 0x2f0]
mov word [ebx + 0x28], ax
mov eax, dword [esp + 0x98]
mov word [ebx + 0x2a], ax
mov eax, dword [ebp + 0x84]
mov dword [ebx + 0x24], eax
mov eax, dword [esp + 0x34]
mov dword [ebx + 0x4c], 0
mov dword [ebx + 0x49], 0
mov dword [ebx + 0x45], 0
mov dword [ebx + 0x41], 0
mov dword [ebx + 0x3d], 0
mov dword [ebx + 0x39], 0
mov dword [ebx + 0x35], 0
mov dword [ebx + 0x31], 0
mov dword [ebx + 0x2d], 0
add eax, 0x48
push eax
push 0
push edi
call fcn.0098a5f0
add esp, 0xc
add esi, ebx
lea eax, [ebx + 0x1e8]
lea ebp, [ebx + 0x50]
mov dword [esp + 0x54], ebx
mov ecx, esi
mov dword [esp + 0x58], ebp
mov dword [esp + 0x14], eax
mov dword [esp + 0x60], esi
call fcn.0081c7e0
mov ecx, ebp
mov edx, ebx
mov dword [ebx + 0x1ec], 0
mov dword [esp], ebx
call fcn.0081c800
mov edx, dword [esp + 0x88]
mov ecx, ebp
push 0x2c
call fcn.0081c830
add esp, 4
cmp dword [esp + 0x2c], 0
mov dword [esp + 0x3c], edi
mov dword [esp + 0x34], ebp
je 0x816042
mov ebx, dword [esp + 4]
mov ebp, dword [esp + 0x14]
xor edi, edi
lea eax, [edi + edi*8]
mov ecx, ebp
mov edx, dword [ebx + eax*8 + 0x34]
lea esi, [ebx + eax*8 + 8]
call fcn.0081c890
mov ecx, dword [esp + 0xc]
mov edx, esi
push dword [esp + 0x34]
call fcn.0081c8a0
add esp, 4
inc edi
cmp edi, dword [ebx]
jl 0x816014
jmp 0x816232
mov ecx, dword [esp + 8]
test ecx, ecx
je 0x816054
mov eax, dword [esp]
mov cl, byte [ecx]
lea eax, [eax + 0x2d]
mov byte [eax], cl
test dword [esp + 0x10], 0x100
je 0x816065
mov eax, dword [esp]
mov byte [eax + 0x2f], 1
mov edx, 0x79b690
mov esi, 0x79b690
xor eax, eax
movzx edi, byte [0xbb9ca7]
or edx, 2
xor esi, 2
mov ecx, edx
add ecx, esi
sete al
mov ecx, eax
not ecx
lea eax, [eax + ecx*2 + 4]
and al, 7
movzx eax, al
bt edi, eax
jb 0x81621b
mov al, byte [0xbb9ca7]
mov edi, edx
xor ecx, ecx
mov ah, 1
add edi, esi
sete cl
mov ebx, ecx
not ebx
lea ecx, [ecx + ebx*2 + 4]
and cl, 7
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbb9ca7], ah
jne 0x8160a0
mov ecx, 0x79b690
mov edx, 0x79b690
xor ebx, ebx
movzx eax, al
or ecx, 2
xor edx, 2
mov esi, ecx
add esi, edx
sete bl
mov esi, ebx
not ebx
lea ebx, [esi + ebx*2 + 4]
and bl, 7
xor bl, 7
movzx esi, bl
bt eax, esi
jae 0x816120
mov esi, ecx
xor eax, eax
add esi, edx
movzx esi, byte [0xbb9ca7]
sete al
mov ebx, eax
not ebx
lea eax, [eax + ebx*2 + 4]
and al, 7
movzx eax, al
bt esi, eax
jae 0x8160f9
jmp 0x81621b
xor eax, eax
add ecx, edx
movzx edx, byte [0xbb9ca7]
sete al
mov ecx, eax
not ecx
lea eax, [eax + ecx*2 + 4]
and al, 7
movzx eax, al
bt edx, eax
jb 0x8161ec
mov ecx, 0x79b690
mov edx, 0x79b690
xor eax, eax
xor edx, 2
or ecx, 2
add ecx, edx
sete al
mov ecx, eax
not ecx
and ecx, 0x823
lea ecx, [eax + ecx*2 - 0x5f049c64]
mov eax, dword [0xbb9c90]
mov edx, ecx
shr edx, 0x1f
or edx, ecx
xor eax, ecx
and cl, 7
mov dword [0xbb9c90], eax
not eax
imul edx, eax
mov eax, dword [0xbb9c94]
lea esi, [edx + edx]
xor eax, edx
shr edx, 0x1e
mov dword [0xbb9c94], eax
or esi, edx
not eax
mov edx, dword [0xbb9c98]
imul eax, esi
lea esi, [eax*4]
xor edx, eax
shr eax, 0x1d
mov dword [0xbb9c98], edx
or esi, eax
not edx
mov eax, dword [0xbb9c9c]
imul edx, esi
lea esi, [edx*8]
xor eax, edx
shr edx, 0x1c
mov dword [0xbb9c9c], eax
or esi, edx
not eax
mov dl, 1
imul eax, esi
shl dl, cl
xor dword [0xbb9ca0], eax
or byte [0xbb9ca7], dl
mov eax, 0x79b690
mov ecx, 0x79b690
xor edx, edx
xor ecx, 2
or eax, 2
add eax, ecx
sete dl
mov eax, edx
not eax
lea ecx, [edx + eax*2 + 4]
mov al, 0xfe
and cl, 7
xor cl, 7
rol al, cl
and byte [0xbb9ca7], al
push 0xbb9c90
push 0
push dword [esp + 0x14]
call fcn.007fdcc0
add esp, 0xc
mov ebx, dword [esp + 4]
mov edx, dword [esp + 0x34]
mov ecx, ebx
call fcn.0081cbf0
mov edi, dword [esp + 0x18]
mov esi, dword [esp]
cmp byte [edi + 0x51], 0
jne 0x816a09
cmp dword [esi + 0x5c], 0
mov ecx, dword [esp + 0x10]
jle 0x8162c5
mov ebp, dword [esp + 0x34]
xor esi, esi
mov edi, dword [ebp + 0x14]
lea ebx, [esi + esi*2]
shl ebx, 4
test byte [edi + ebx + 0xa], 2
jne 0x8162bf
mov eax, dword [edi + ebx + 0x28]
or eax, dword [edi + ebx + 0x2c]
jne 0x8162bf
cmp dword [esp + 0x2c], 0
lea edx, [edi + ebx]
je 0x816299
mov ecx, dword [edx]
mov dword [esp + 0x28], edx
call fcn.0081cc20
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x10]
test eax, eax
je 0x8162bf
lea edi, [edi + ebx + 0xa]
push 0x10
mov eax, dword [esp + 4]
push dword [eax + 0x20]
push dword [edx]
push dword [esp + 0x18]
call fcn.007fc0d0
mov ecx, dword [esp + 0x20]
add esp, 0x10
or byte [edi], 4
mov ebp, dword [esp + 0x58]
inc esi
cmp esi, dword [ebp + 0xc]
jl 0x81625e
test ecx, 0x100
je 0x81630d
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 4]
push dword [esp + 0x90]
push dword [esp + 0x38]
call fcn.0081cc90
add esp, 8
test eax, eax
je 0x8162f5
mov eax, dword [esp]
mov byte [eax + 0x2f], 1
jmp 0x81630d
cmp dword [esp + 8], 0
jne 0x81630d
mov eax, dword [esp]
mov ecx, dword [esp + 0x90]
or byte [eax + 0x28], 0x80
mov dword [eax + 8], ecx
cmp dword [esp + 0x2c], 1
jne 0x816321
lea ecx, [esp + 0x54]
call fcn.0081cd70
test eax, eax
jne 0x81636e
lea ecx, [esp + 0x54]
call fcn.0081cf40
mov esi, dword [esp]
mov edi, dword [esp + 0x18]
test eax, eax
jne 0x816a09
mov ecx, esi
xor edx, edx
call fcn.0081d350
cmp byte [edi + 0x51], 0
jne 0x816a09
cmp dword [esi + 8], 0
je 0x816377
mov eax, dword [esi + 0x34]
mov ecx, esi
inc eax
movsx edx, ax
call fcn.0081d350
mov eax, dword [esp + 0x18]
cmp byte [eax + 0x51], 0
jne 0x816a0d
mov esi, dword [esp]
cmp dword [esi + 8], 0
jne 0x81638f
mov eax, dword [esp + 0x18]
test byte [eax + 0x21], 0x10
je 0x81638f
mov dword [esi + 0x4c], 0xffffffff
mov dword [esi + 0x48], 0xffffffff
mov eax, dword [esp + 0xc]
cmp dword [eax + 0x24], 0
jne 0x816a0d
mov eax, dword [esp + 0x18]
cmp byte [eax + 0x51], 0
jne 0x816a0d
cmp dword [esp + 0x90], 0
mov dword [esp + 0x38], 0xffffffff
jne 0x8163d5
mov edi, dword [esp + 4]
mov ebp, dword [esp]
mov edx, dword [esp + 0x10]
mov dword [esp + 0x14], 0xffffffff
jmp 0x8165d3
mov ebp, dword [esp]
mov edi, dword [esp + 4]
mov edx, dword [esp + 0x10]
cmp byte [ebp + 0x2c], 2
jae 0x8163f3
mov dword [esp + 0x14], 0xffffffff
jmp 0x8165d3
mov eax, dword [esp + 0x18]
mov dword [esp + 0x38], 0xffffffff
test byte [eax + 0x4d], 1
je 0x816412
mov dword [esp + 0x14], 0xffffffff
jmp 0x8165d3
mov esi, dword [esp + 0x14]
mov edx, dword [esp + 0x90]
mov ecx, esi
call fcn.0081dcd0
mov ecx, edx
mov edx, dword [esp + 0x5c]
mov dword [esp + 0x4c], eax
test edx, edx
je 0x816447
mov dword [esp + 0x40], ecx
mov ecx, esi
call fcn.0081dcd0
mov ecx, dword [esp + 0x40]
or dword [esp + 0x4c], eax
or ecx, edx
mov al, byte [ebp + 0x2c]
mov edx, dword [esp + 0x10]
mov dword [esp + 0x38], 0xffffffff
movzx ebx, al
mov byte [esp + 0x23], al
mov eax, ebx
dec eax
jg 0x81646f
mov dword [esp + 0x14], 0xffffffff
jmp 0x8165d3
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x40], ecx
mov dword [esp + 0x48], ebx
imul ecx, eax, 0x58
mov ebx, eax
mov eax, dword [esp + 0x3c]
mov edi, dword [ebp + 4]
mov dword [esp + 0x28], ecx
mov eax, dword [eax + ecx + 0x48]
movzx ecx, byte [eax + 0x10]
lea ebp, [ecx + ecx*8]
test byte [edi + ebp*8 + 0x2c], 8
jne 0x8164ad
mov edi, dword [esp + 4]
mov ebp, dword [esp]
jmp 0x8165ca
test edx, 0x100
jne 0x8164bb
test byte [eax + 0x25], 0x10
je 0x8164a1
mov dword [esp + 0x24], ebx
mov esi, dword [eax + 8]
mov ebx, dword [eax + 0xc]
mov ecx, ebx
mov edx, esi
and ecx, dword [esp + 0x40]
and edx, dword [esp + 0x4c]
or edx, ecx
je 0x8164e9
mov edi, dword [esp + 4]
mov ebp, dword [esp]
mov edx, dword [esp + 0x10]
mov ebx, dword [esp + 0x24]
jmp 0x8165ca
mov ecx, dword [esp + 0x58]
mov dword [esp + 8], ebx
mov ebx, dword [ecx + 0xc]
test ebx, ebx
jg 0x816501
mov ebp, dword [esp]
mov cl, byte [esp + 0x23]
jmp 0x81656b
mov edx, dword [ecx + 0x14]
lea ecx, [ebx + ebx*2]
lea edi, [edi + ebp*8 + 0x34]
shl ecx, 4
mov dword [esp + 0x44], edi
add ecx, edx
mov ebx, edx
mov edi, dword [ebx + 0x2c]
mov ebp, dword [ebx + 0x28]
and edi, dword [esp + 8]
and ebp, esi
or edi, ebp
je 0x81653b
mov ebp, dword [ebx]
test byte [ebp + 4], 1
je 0x8164d5
movsx edi, word [ebp + 0x24]
mov ebp, dword [esp + 0x44]
cmp dword [ebp], edi
jne 0x8164d5
add ebx, 0x30
cmp ebx, ecx
jb 0x816516
mov ebx, dword [esp + 8]
mov ebp, dword [esp]
mov edi, esi
and edi, dword [edx + 0x28]
and ebx, dword [edx + 0x2c]
or ebx, edi
je 0x816559
or byte [edx + 0xa], 4
add edx, 0x30
cmp edx, ecx
jae 0x816568
mov edi, dword [eax + 8]
mov ebx, dword [eax + 0xc]
jmp 0x81654b
mov cl, byte [ebp + 0x2c]
mov edx, dword [esp + 8]
mov ebx, dword [esp + 0x24]
mov edi, dword [esp + 4]
movzx eax, cl
not esi
dec eax
not edx
sub eax, ebx
je 0x8165b1
mov dword [esp + 8], edx
mov edx, dword [esp + 0x3c]
mov ebx, dword [esp + 0x28]
imul ecx, dword [esp + 0x48], 0x58
imul eax, eax, 0x58
add ebx, edx
add ecx, edx
push eax
push ecx
push ebx
mov ebx, dword [esp + 0x30]
call fcn.0098adc0
mov edx, dword [esp + 0x14]
add esp, 0xc
mov cl, byte [ebp + 0x2c]
and dword [esp + 0x14], edx
mov edx, dword [esp + 0x10]
and dword [esp + 0x38], esi
dec dword [esp + 0x2c]
dec cl
mov byte [esp + 0x23], cl
mov byte [ebp + 0x2c], cl
mov eax, ebx
dec eax
jg 0x81647b
movsx eax, word [ebp + 0x34]
mov ecx, dword [ebp]
add dword [ecx + 0x84], eax
test dl, 4
jne 0x8165e9
xor edx, edx
jmp 0x816652
mov eax, dword [ebp + 0x338]
mov ecx, dword [eax + 0x24]
test ecx, 0x1000
jne 0x816625
test dl, 8
jne 0x816603
xor edx, edx
jmp 0x816652
mov edx, dword [edi + 0x18]
cmp dword [edx + 0x38], 0
je 0x816610
xor edx, edx
jmp 0x816652
test byte [esp + 0x10], 0x10
jne 0x816625
mov edx, ecx
and edx, 0x2000
je 0x816625
xor edx, edx
jmp 0x816652
mov edx, ecx
mov bl, 2
shr edx, 0xc
and edx, 1
sub bl, dl
xor edx, edx
test cl, 0x40
mov byte [ebp + 0x2e], bl
je 0x816652
mov esi, dword [edi + 0x18]
mov bl, byte [esi + 0x24]
test bl, bl
js 0x816652
mov edx, dword [esp + 0x1c]
and ecx, 0xffffffbf
mov dword [eax + 0x24], ecx
and edx, 8
cmp dword [esp + 0x2c], 0
jle 0x816924
cmp dword [esp + 0x50], 0
mov ebp, dword [esp + 0x3c]
sete al
cmp dword [esp + 0x98], 0
mov byte [esp + 0x48], al
sete cl
xor esi, esi
or cl, al
movzx eax, dx
mov byte [esp + 0x44], cl
mov dword [esp + 0x40], eax
movzx eax, byte [ebp + 0x34]
mov ebx, edi
mov ecx, dword [esp + 0x18]
lea eax, [eax + eax*8]
mov edi, dword [edi + eax*8 + 0x18]
mov dword [esp + 0x28], eax
mov edx, dword [edi + 0x48]
call fcn.0078dee0
mov ecx, dword [ebp + 0x48]
test byte [edi + 0x24], 2
mov edx, eax
mov dword [esp + 0x1c], edi
mov dword [esp + 8], ecx
mov ecx, dword [esp + 0x50]
jne 0x816803
mov eax, dword [esp + 0x1c]
cmp dword [eax + 0xc], 0
jne 0x816803
mov eax, dword [esp + 8]
mov eax, dword [eax + 0x24]
test eax, 0x400
je 0x816711
mov edi, edx
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
call fcn.007d0920
mov ecx, dword [esp + 0x30]
mov edx, 0xa5
push 0xfffffffffffffff4
push eax
push 0
push 0
mov eax, dword [esp + 0x38]
push dword [ebx + eax*8 + 0x34]
call fcn.007f75d0
mov edx, edi
add esp, 0x14
jmp 0x816803
mov edi, dword [esp + 0x1c]
cmp dword [edi + 0x38], 0
jne 0x816803
and eax, 0x40
mov dword [esp + 0x24], edx
or eax, ecx
jne 0x8167e4
mov edi, dword [esp]
cmp byte [edi + 0x2e], 0
jne 0x816742
mov ecx, dword [esp + 0x28]
mov eax, 0x60
jmp 0x816752
mov ecx, dword [esp + 0x28]
mov eax, dword [ebx + ecx*8 + 0x34]
mov dword [edi + 0x14], eax
mov eax, 0x61
mov edx, dword [ebx + ecx*8 + 0x34]
mov ecx, dword [esp + 0xc]
push eax
push dword [esp + 0x20]
push dword [esp + 0x2c]
call fcn.007f77f0
add esp, 0xc
cmp byte [edi + 0x2e], 0
jne 0x8167d1
mov eax, dword [esp + 0x1c]
cmp word [eax + 0x2a], 0x3f
jg 0x8167d1
mov eax, dword [esp + 0x1c]
test byte [eax + 0x24], 0xe0
jne 0x8167d1
mov ecx, dword [esp + 0x28]
mov eax, dword [ebx + ecx*8 + 0x40]
mov ecx, dword [ebx + ecx*8 + 0x44]
mov ebx, dword [esp + 4]
bsr edi, eax
bsr edx, ecx
xor edi, 0x1f
xor edx, 0x1f
add edi, 0x20
test ecx, ecx
cmovne edi, edx
mov edx, 0x40
sub edx, edi
or eax, ecx
mov ecx, dword [esp + 0x30]
mov eax, 0
cmove edx, eax
mov eax, edx
mov edx, 0xffffffff
push 0xfffffffffffffffd
push eax
call fcn.0078e110
add esp, 8
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x40]
call fcn.0078e010
mov edx, dword [esp + 0x24]
jmp 0x816803
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0xc]
push dword [eax]
push 0
push dword [eax + 0x1c]
call fcn.007f78a0
mov edx, dword [esp + 0x30]
add esp, 0xc
mov ecx, dword [esp + 8]
mov edi, ebx
test byte [ecx + 0x25], 2
je 0x816909
mov eax, dword [esp + 0x1c]
mov edi, dword [ecx + 0x20]
cmp byte [eax + 0x24], 0
jns 0x81683b
mov eax, dword [edi + 0x38]
mov cl, byte [esp + 0x48]
and eax, 3
cmp eax, 2
sete al
xor cl, 1
test al, cl
jne 0x816a3d
mov eax, dword [esp]
cmp byte [eax + 0x2e], 0
je 0x816886
mov eax, dword [esp + 4]
mov ecx, dword [esp + 0x28]
lea eax, [eax + ecx*8 + 0x18]
mov eax, dword [eax]
mov ecx, dword [eax + 8]
mov eax, dword [esp + 0x98]
test ecx, ecx
je 0x816877
mov eax, dword [esp + 0x98]
cmp ecx, edi
je 0x816877
mov ecx, dword [ecx + 0x14]
inc eax
test ecx, ecx
je 0x816877
cmp ecx, edi
jne 0x81686b
mov ecx, dword [esp]
mov ebx, edx
mov edx, 0x61
mov dword [ecx + 0x18], eax
jmp 0x8168ad
cmp byte [esp + 0x44], 0
mov eax, dword [esp + 0x98]
mov ebx, edx
mov edx, 0x5f
je 0x8168ad
mov edx, dword [esp + 0xc]
mov eax, dword [edx + 0x28]
lea ecx, [eax + 1]
mov dword [edx + 0x28], ecx
mov edx, 0x60
mov ecx, dword [esp + 0x30]
mov dword [ebp + 8], eax
push ebx
push dword [edi + 0x2c]
push eax
call fcn.007d10f0
add esp, 0xc
mov ecx, dword [esp + 0xc]
mov edx, edi
call fcn.007f7980
mov eax, dword [esp + 8]
mov edi, dword [esp + 4]
mov edx, ebx
mov eax, dword [eax + 0x24]
test eax, 0x88002
jne 0x816909
and eax, 0xf
je 0x816909
mov eax, dword [esp]
test byte [eax + 0x28], 1
jne 0x816909
mov eax, dword [esp]
cmp byte [eax + 0x2f], 2
je 0x816909
mov ecx, dword [esp + 0x30]
mov ebx, edx
mov edx, 2
call fcn.0078e010
mov edx, ebx
test edx, edx
js 0x816916
mov ecx, dword [esp + 0xc]
call fcn.007fea70
inc esi
add ebp, 0x58
cmp esi, dword [esp + 0x2c]
jne 0x816687
mov ecx, dword [esp + 0x30]
call fcn.007fdcb0
mov ecx, dword [esp]
mov dword [ecx + 0x38], eax
mov ecx, dword [esp + 0x18]
cmp byte [ecx + 0x51], 0
jne 0x816a0d
cmp dword [esp + 0x2c], 0
jg 0x816950
mov ebx, dword [esp]
jmp 0x816a28
mov ebp, dword [esp + 0x3c]
xor esi, esi
imul edi, esi, 0x58
mov eax, ebp
mov eax, dword [eax + edi + 0x48]
lea ebp, [ebp + edi]
test byte [eax + 0x25], 0x40
je 0x8169a1
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 4]
mov edx, dword [esp + 0x34]
movzx eax, byte [eax + edi + 0x34]
lea eax, [eax + eax*8]
lea eax, [ecx + eax*8 + 8]
mov ecx, dword [esp + 0xc]
push ebp
push dword [esp + 0x18]
push dword [esp + 0x40]
push eax
call fcn.0081dd20
add esp, 0x10
mov eax, dword [esp + 0x18]
cmp byte [eax + 0x51], 0
jne 0x816a0d
mov ebx, dword [esp + 0xc]
mov edx, dword [esp + 4]
mov ecx, ebx
push dword [esp + 0x10]
push ebp
call fcn.0081e830
add esp, 8
mov ecx, dword [esp + 0x30]
call fcn.007fdcb0
mov dword [esp + 8], ebp
mov ebp, dword [esp + 0x3c]
mov edx, dword [esp + 0x30]
mov ecx, ebx
mov dword [ebp + edi + 0x20], eax
push dword [esp + 0x14]
push dword [esp + 0x3c]
push dword [esp + 0x10]
push esi
mov ebx, dword [esp + 0x10]
push ebx
call fcn.0081fda0
add esp, 0x14
inc esi
mov ecx, dword [ebp + edi + 0x18]
mov dword [esp + 0x38], eax
mov dword [esp + 0x14], edx
cmp esi, dword [esp + 0x2c]
mov dword [ebx + 0x1c], ecx
jl 0x816956
jmp 0x816a28
test esi, esi
je 0x816a26
mov edx, dword [esp]
mov ecx, dword [esp + 0xc]
mov eax, dword [edx + 0x24]
mov dword [ecx + 0x84], eax
mov ecx, dword [esp + 0x18]
call fcn.00821960
xor ebx, ebx
mov ecx, dword [esp + 0x70]
xor ecx, esp
call fcn.00989fe9
mov eax, ebx
add esp, 0x74
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, dword [ebp + 4]
mov edi, dword [esp + 4]
mov dword [ebp + 8], eax
jmp 0x816909