Function at 0x40ad40
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x130
mov ecx, dword [0x421a70]
call fcn.0041eb20
test eax, eax
jle 0x40ba76
mov ebx, 0x55555556
xor esi, esi
mov dword [esp + 0x18], 0
mov dword [esp + 8], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
jmp 0x40af27
mov dword [esp + 0x18], 0
jmp 0x40ba40
mov dword [esp + 0x14], 1
mov ebp, 0xffffffff
mov edx, 1
jmp 0x40adf8
mov dword [esp + 0x14], 1
xor ebp, ebp
mov edx, 1
jmp 0x40adf8
mov ebp, 0xffffffff
mov dword [esp + 0x14], 0
mov edx, 1
jmp 0x40adf8
call fcn.0040dde0
add eax, 0xbb44073c
xor edx, edx
sub eax, dword [ebx + 4]
add eax, 0x44bbf8c4
cmp eax, 0x707
seta dl
mov ebx, 0x55555556
test edx, edx
setne al
cmp dword [0x421a38], 0x31
setl cl
xor cl, al
jne 0x40ba45
test edx, edx
je 0x40ba45
mov dword [esp + 0x28], ebp
push 0x100000
mov edi, dword [esp + 0xc]
push dword [edi + 4]
call fcn.00403d20
add esp, 8
mov dword [esp + 0x24], eax
lea eax, [esp + 0x2c]
push eax
push 0
mov ebp, dword [esp + 0x28]
push ebp
push 0x412540
push 0
push 0
call dword [0x420138]
test eax, eax
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
mov ecx, 0
mov dword [esp + 0x18], 0
cmovne ebp, ecx
cmovne edi, ecx
mov dword [esp + 0x20], ebp
mov dword [esp + 8], edi
cmovne eax, ecx
cmovne edx, ecx
cmp dword [esp + 0x14], 0
mov dword [esp + 0x1c], eax
mov dword [esp + 0x10], edx
je 0x40aef0
mov edi, dword [esp + 0xc]
mov ebx, dword [edi + 0x4c]
test ebx, ebx
jne 0x40aeab
push 0x10
call fcn.00411090
add esp, 4
mov ebx, eax
mov ecx, ebx
push 8
call fcn.00413f20
mov dword [edi + 0x4c], ebx
mov ebp, dword [esp + 0x28]
test ebp, ebp
sets dl
setns al
test ebx, ebx
sete ah
setne cl
xor ah, dl
jne 0x40af07
or al, cl
xor al, 1
jne 0x40af07
mov ecx, ebx
call fcn.0041eb20
cmp ebp, eax
jae 0x40af07
mov ecx, dword [edi + 0x4c]
push ebp
call fcn.00408f40
mov edi, eax
mov ebx, 0x55555556
test edi, edi
je 0x40aef0
call fcn.0040dde0
mov dword [edi + 4], eax
mov eax, dword [esp + 0x24]
test eax, eax
je 0x40ba45
push eax
call fcn.004193e0
jmp 0x40b7c5
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call fcn.0040dde0
mov dword [esp + 4], eax
mov eax, esp
mov ecx, dword [edi + 0x4c]
push eax
call fcn.0040f030
jmp 0x40ba40
mov ecx, dword [0x421a70]
push esi
call fcn.00408f40
mov edi, dword [eax]
call fcn.00418db0
mov dword [esp], eax
mov ecx, dword [esp]
mov eax, ecx
imul ebx
mov eax, edx
shr eax, 0x1f
add eax, edx
lea eax, [eax + eax*2]
cmp ecx, eax
je 0x40af73
mov eax, dword [esp]
lea eax, [edi + eax + 2]
mov dword [esp], eax
jmp 0x40af61
inc dword [esp]
mov eax, dword [esp]
not eax
or eax, 0xfffffffc
cmp eax, 0xffffffff
je 0x40af5e
jmp 0x40b07c
mov eax, dword [esp]
mov ecx, eax
xor ecx, 0xfffffffe
test eax, ecx
mov eax, dword [esp]
je 0x40afbd
mov ecx, 2
neg eax
sub ecx, edi
sub eax, ecx
neg eax
mov dword [esp], eax
jmp 0x40afa3
xor eax, eax
mov ecx, 1
sub eax, dword [esp]
sub ecx, eax
mov dword [esp], ecx
mov ecx, dword [esp]
mov eax, ecx
imul ebx
mov eax, edx
shr eax, 0x1f
add eax, edx
lea eax, [eax + eax*2]
cmp ecx, eax
je 0x40af94
jmp 0x40b07c
mov ecx, dword [esp]
not eax
or eax, 0xfffffffc
cmp eax, 0xffffffff
je 0x40b01a
mov eax, edi
mov edx, 3
add ecx, 2
neg eax
sub edx, eax
imul edx, ecx
mov dword [esp], edx
jmp 0x40afe4
dec eax
mov dword [esp], eax
mov eax, dword [esp]
not eax
or eax, 0xfffffffe
cmp eax, 0xffffffff
jne 0x40b07c
mov ecx, dword [esp]
mov edx, 0x66666667
mov eax, ecx
imul edx
mov eax, edx
sar edx, 1
shr eax, 0x1f
add edx, eax
lea eax, [edx + edx*4]
cmp ecx, eax
mov eax, dword [esp]
jne 0x40afe0
inc eax
mov dword [esp], eax
jmp 0x40afe4
mov eax, ecx
mov edx, 0x66666667
imul edx
mov eax, edx
sar edx, 1
shr eax, 0x1f
add edx, eax
lea eax, [edx + edx*4]
cmp ecx, eax
je 0x40b07c
mov eax, dword [esp]
lea ecx, [edi + 0x17]
add eax, 0xb
cdq
idiv ecx
jmp 0x40b042
inc eax
mov dword [esp], eax
mov ecx, dword [esp]
mov eax, ecx
imul ebx
mov eax, edx
shr eax, 0x1f
add eax, edx
lea eax, [eax + eax*2]
cmp ecx, eax
jne 0x40b07c
mov ecx, dword [esp]
mov edx, 0x66666667
mov eax, ecx
imul edx
mov eax, edx
sar edx, 1
shr eax, 0x1f
add edx, eax
lea eax, [edx + edx*4]
cmp ecx, eax
mov eax, dword [esp]
jne 0x40b041
dec eax
jmp 0x40b042
test edi, edi
je 0x40ba45
cmp dword [esp + 8], 0
mov dword [esp + 0xc], edi
je 0x40b0cd
call fcn.00418db0
mov dword [esp], eax
mov ecx, dword [esp]
mov eax, ecx
imul ebx
mov eax, edx
shr eax, 0x1f
add eax, edx
lea eax, [eax + eax*2]
cmp ecx, eax
je 0x40b0ee
mov eax, dword [esp]
mov ecx, dword [esp + 0x10]
lea eax, [ecx + eax + 2]
mov dword [esp], eax
jmp 0x40b0bf
inc dword [esp]
mov eax, dword [esp]
mov ecx, eax
xor ecx, 0xfffffffc
test eax, ecx
je 0x40b0bc
jmp 0x40b125
mov ebp, 0x55555556
push 0
push 0x18
call fcn.0040ac80
add esp, 8
mov dword [esp + 0x20], eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x1c], eax
mov edi, eax
jmp 0x40b137
mov eax, dword [esp]
mov ecx, eax
xor ecx, 0xfffffffe
test eax, ecx
mov eax, dword [esp]
je 0x40b259
sub eax, dword [esp + 0x10]
add eax, 2
mov dword [esp], eax
jmp 0x40b110
inc dword [esp]
mov ecx, dword [esp]
mov eax, ecx
imul ebx
mov eax, edx
shr eax, 0x1f
add eax, edx
lea eax, [eax + eax*2]
cmp ecx, eax
je 0x40b10d
mov edi, dword [esp + 8]
mov ebp, 0x55555556
push edi
call fcn.004061e0
add esp, 4
mov ecx, dword [esp + 0xc]
mov dword [esp + 8], edi
push edi
call fcn.004183d0
mov ebx, eax
call fcn.00418db0
mov dword [esp], eax
mov ecx, dword [esp]
mov eax, ecx
imul ebp
mov eax, edx
shr eax, 0x1f
add eax, edx
lea eax, [eax + eax*2]
cmp ecx, eax
je 0x40b197
mov eax, dword [esp]
lea eax, [ebx + eax + 2]
mov dword [esp], eax
mov eax, dword [esp]
mov edi, dword [esp + 0xc]
mov ecx, eax
xor ecx, 0xfffffffc
test eax, ecx
jne 0x40b328
inc dword [esp]
mov eax, dword [esp]
not eax
or eax, 0xfffffffc
cmp eax, 0xffffffff
je 0x40b182
jmp 0x40b328
mov eax, dword [esp]
mov ecx, eax
xor ecx, 0xfffffffe
test eax, ecx
mov eax, dword [esp]
je 0x40b1f1
mov ecx, 0xde75bac0
sub ecx, ebx
lea eax, [ecx + eax + 0x218a4542]
mov dword [esp], eax
mov ecx, dword [esp]
mov edi, dword [esp + 0xc]
mov eax, ecx
imul ebp
mov eax, edx
shr eax, 0x1f
add eax, edx
lea eax, [eax + eax*2]
cmp ecx, eax
jne 0x40b328
inc dword [esp]
mov ecx, dword [esp]
mov eax, ecx
imul ebp
mov eax, edx
shr eax, 0x1f
add eax, edx
lea eax, [eax + eax*2]
cmp ecx, eax
je 0x40b1d4
jmp 0x40b328
mov ecx, eax
xor ecx, 0xfffffffc
test eax, ecx
mov ecx, dword [esp]
je 0x40b2c2
add ecx, 2
lea eax, [ebx + 3]
imul eax, ecx
mov dword [esp], eax
mov eax, dword [esp]
mov edi, dword [esp + 0xc]
not eax
or eax, 0xfffffffe
cmp eax, 0xffffffff
jne 0x40b328
mov ecx, dword [esp]
mov edx, 0x66666667
mov eax, ecx
imul edx
mov eax, edx
sar edx, 1
shr eax, 0x1f
add edx, eax
lea eax, [edx + edx*4]
cmp ecx, eax
mov eax, dword [esp]
je 0x40b244
dec eax
jmp 0x40b245
inc eax
mov dword [esp], eax
mov eax, dword [esp]
mov ecx, eax
xor ecx, 0xfffffffe
test eax, ecx
je 0x40b222
jmp 0x40b328
mov ecx, dword [esp]
not eax
or eax, 0xfffffffc
cmp eax, 0xffffffff
je 0x40b559
mov eax, dword [esp + 0x10]
add ecx, 2
lea eax, [eax + 3]
imul eax, ecx
mov dword [esp], eax
mov eax, dword [esp]
not eax
or eax, 0xfffffffe
cmp eax, 0xffffffff
jne 0x40b125
mov ecx, dword [esp]
mov edx, 0x66666667
mov eax, ecx
imul edx
mov eax, edx
sar edx, 1
shr eax, 0x1f
add edx, eax
lea eax, [edx + edx*4]
cmp ecx, eax
mov eax, dword [esp]
je 0x40b2ad
dec eax
jmp 0x40b2ae
inc eax
mov dword [esp], eax
mov eax, dword [esp]
mov ecx, eax
xor ecx, 0xfffffffe
test eax, ecx
je 0x40b28b
jmp 0x40b125
mov eax, ecx
mov edx, 0x66666667
mov edi, dword [esp + 0xc]
imul edx
mov eax, edx
sar edx, 1
shr eax, 0x1f
add edx, eax
lea eax, [edx + edx*4]
cmp ecx, eax
je 0x40b328
mov eax, dword [esp]
lea ecx, [ebx + 0x17]
add eax, 0xb
cdq
idiv ecx
jmp 0x40b2ee
inc eax
mov dword [esp], eax
mov ecx, dword [esp]
mov eax, ecx
imul ebp
mov eax, edx
shr eax, 0x1f
add eax, edx
lea eax, [eax + eax*2]
cmp ecx, eax
jne 0x40b328
mov ecx, dword [esp]
mov edx, 0x66666667
mov eax, ecx
imul edx
mov eax, edx
sar edx, 1
shr eax, 0x1f
add edx, eax
lea eax, [edx + edx*4]
cmp ecx, eax
mov eax, dword [esp]
jne 0x40b2ed
dec eax
jmp 0x40b2ee
push edi
call fcn.00401eb0
add esp, 4
mov ecx, dword [esp + 8]
test eax, eax
mov dword [ecx], eax
je 0x40ba40
mov eax, ebx
mov ecx, ebx
mov edx, ebx
not eax
and ecx, 0x5e73e9c0
and edx, 2
and eax, 0xa18c163f
or ecx, eax
xor ecx, 0xa18c163d
or edx, ecx
cmp edx, 2
jne 0x40b3a5
call fcn.00418db0
mov dword [esp], eax
mov ecx, dword [esp]
mov eax, ecx
imul ebp
mov eax, edx
shr eax, 0x1f
add eax, edx
lea eax, [eax + eax*2]
cmp ecx, eax
je 0x40b3f7
xor ecx, ecx
lea eax, [ebx + 3]
sub ecx, dword [esp]
sub eax, ecx
mov dword [esp], eax
jmp 0x40b393
inc dword [esp]
mov eax, dword [esp]
not eax
or eax, 0xfffffffc
cmp eax, 0xffffffff
je 0x40b390
jmp 0x40b633
call fcn.00418db0
mov dword [esp], eax
mov ebx, 0x55555556
mov ecx, dword [esp]
mov eax, ecx
imul ebx
mov eax, edx
shr eax, 0x1f
add eax, edx
lea eax, [eax + eax*2]
cmp ecx, eax
mov eax, dword [esp]
je 0x40b43b
inc eax
lea ebp, [esp + 0x30]
mov dword [esp], eax
mov eax, dword [esp]
mov ecx, eax
xor ecx, 0xfffffffc
test eax, ecx
jne 0x40b79d
inc dword [esp]
mov eax, dword [esp]
not eax
or eax, 0xfffffffc
cmp eax, 0xffffffff
je 0x40b3e2
jmp 0x40b79d
mov eax, dword [esp]
not eax
or eax, 0xfffffffe
cmp eax, 0xffffffff
mov eax, dword [esp]
je 0x40b498
mov ecx, 0x6afcb50a
sub ecx, ebx
lea eax, [ecx + eax - 0x6afcb509]
mov dword [esp], eax
jmp 0x40b421
inc dword [esp]
mov ecx, dword [esp]
mov eax, ecx
imul ebp
mov eax, edx
shr eax, 0x1f
add eax, edx
lea eax, [eax + eax*2]
cmp ecx, eax
je 0x40b41e
jmp 0x40b633
not eax
or eax, 0xfffffffe
cmp eax, 0xffffffff
mov eax, dword [esp]
je 0x40b4eb
add eax, 3
lea ebp, [esp + 0x30]
mov dword [esp], eax
mov ecx, dword [esp]
mov eax, ecx
imul ebx
mov eax, edx
shr eax, 0x1f
add eax, edx
lea eax, [eax + eax*2]
cmp ecx, eax
jne 0x40b79d
xor eax, eax
mov ecx, 1
sub eax, dword [esp]
sub ecx, eax
mov dword [esp], ecx
mov ecx, dword [esp]
mov eax, ecx
imul ebx
mov eax, edx
shr eax, 0x1f
add eax, edx
lea eax, [eax + eax*2]
cmp ecx, eax
je 0x40b46f
jmp 0x40b79d
mov ecx, dword [esp]
not eax
or eax, 0xfffffffc
cmp eax, 0xffffffff
je 0x40b5c7
add ecx, 2
lea eax, [ebx + 4]
imul eax, ecx
jmp 0x40b4b5
dec eax
mov dword [esp], eax
mov eax, dword [esp]
not eax
or eax, 0xfffffffe
cmp eax, 0xffffffff
jne 0x40b633
mov ecx, dword [esp]
mov edx, 0x66666667
mov eax, ecx
imul edx
mov eax, edx
sar edx, 1
shr eax, 0x1f
add edx, eax
lea eax, [edx + edx*4]
cmp ecx, eax
mov eax, dword [esp]
jne 0x40b4b4
inc eax
jmp 0x40b4b5
mov ecx, eax
lea ebp, [esp + 0x30]
xor ecx, 0xfffffffc
test eax, ecx
mov ecx, dword [esp]
je 0x40b72a
lea eax, [ecx + ecx + 4]
mov dword [esp], eax
mov eax, dword [esp]
not eax
or eax, 0xfffffffe
cmp eax, 0xffffffff
jne 0x40b79d
mov ecx, dword [esp]
mov edx, 0x66666667
mov eax, ecx
imul edx
mov eax, edx
sar edx, 1
shr eax, 0x1f
add edx, eax
lea eax, [edx + edx*4]
cmp ecx, eax
mov eax, dword [esp]
je 0x40b53c
dec eax
mov dword [esp], eax
jmp 0x40b548
neg eax
mov ecx, 1
sub ecx, eax
mov dword [esp], ecx
mov eax, dword [esp]
mov ecx, eax
xor ecx, 0xfffffffe
test eax, ecx
je 0x40b517
jmp 0x40b79d
mov eax, ecx
mov edx, 0x66666667
imul edx
mov eax, edx
sar edx, 1
shr eax, 0x1f
add edx, eax
lea eax, [edx + edx*4]
cmp ecx, eax
je 0x40b125
mov eax, dword [esp]
mov ecx, dword [esp + 0x10]
add eax, 0xb
lea ecx, [ecx + 0x17]
cdq
idiv ecx
jmp 0x40b589
inc eax
mov dword [esp], eax
mov ecx, dword [esp]
mov eax, ecx
imul ebx
mov eax, edx
shr eax, 0x1f
add eax, edx
lea eax, [eax + eax*2]
cmp ecx, eax
jne 0x40b125
mov ecx, dword [esp]
mov edx, 0x66666667
mov eax, ecx
imul edx
mov eax, edx
sar edx, 1
shr eax, 0x1f
add edx, eax
lea eax, [edx + edx*4]
cmp ecx, eax
mov eax, dword [esp]
jne 0x40b588
dec eax
jmp 0x40b589
mov eax, ecx
mov edx, 0x66666667
imul edx
mov eax, edx
sar edx, 1
shr eax, 0x1f
add edx, eax
lea eax, [edx + edx*4]
cmp ecx, eax
je 0x40b633
mov eax, dword [esp]
mov ecx, ebx
mov edx, 0x18
neg ecx
sub edx, ecx
mov ecx, edx
add eax, 0xb
cdq
idiv ecx
jmp 0x40b5f9
inc eax
mov dword [esp], eax
mov ecx, dword [esp]
mov eax, ecx
imul ebp
mov eax, edx
shr eax, 0x1f
add eax, edx
lea eax, [eax + eax*2]
cmp ecx, eax
jne 0x40b633
mov ecx, dword [esp]
mov edx, 0x66666667
mov eax, ecx
imul edx
mov eax, edx
sar edx, 1
shr eax, 0x1f
add edx, eax
lea eax, [edx + edx*4]
cmp ecx, eax
mov eax, dword [esp]
jne 0x40b5f8
dec eax
jmp 0x40b5f9
cmp ebx, 2
je 0x40b647
mov ecx, edi
call fcn.00408cc0
test eax, eax
jne 0x40ba40
call fcn.00418db0
mov dword [esp], eax
mov ecx, dword [esp]
mov eax, ecx
imul ebp
mov eax, edx
shr eax, 0x1f
add eax, edx
lea eax, [eax + eax*2]
cmp ecx, eax
je 0x40b693
mov eax, dword [esp]
lea eax, [ebx + eax + 3]
mov dword [esp], eax
mov eax, dword [esp]
not eax
or eax, 0xfffffffc
cmp eax, 0xffffffff
jne 0x40ba34
inc dword [esp]
mov eax, dword [esp]
mov ecx, eax
xor ecx, 0xfffffffc
test eax, ecx
je 0x40b67f
jmp 0x40ba34
mov eax, dword [esp]
mov ecx, eax
xor ecx, 0xfffffffe
test eax, ecx
mov eax, dword [esp]
je 0x40b6d1
mov ecx, 1
neg eax
sub ecx, ebx
sub eax, ecx
neg eax
mov dword [esp], eax
jmp 0x40b6b7
inc dword [esp]
mov ecx, dword [esp]
mov eax, ecx
imul ebp
mov eax, edx
shr eax, 0x1f
add eax, edx
lea eax, [eax + eax*2]
cmp ecx, eax
je 0x40b6b4
jmp 0x40ba34
mov ecx, dword [esp]
not eax
or eax, 0xfffffffc
cmp eax, 0xffffffff
je 0x40b9bb
add ecx, 2
add ebx, 4
imul ebx, ecx
mov dword [esp], ebx
jmp 0x40b6f4
dec eax
mov dword [esp], eax
mov eax, dword [esp]
not eax
or eax, 0xfffffffe
cmp eax, 0xffffffff
jne 0x40ba34
mov ecx, dword [esp]
mov edx, 0x66666667
mov eax, ecx
imul edx
mov eax, edx
sar edx, 1
shr eax, 0x1f
add edx, eax
lea eax, [edx + edx*4]
cmp ecx, eax
mov eax, dword [esp]
jne 0x40b6f0
inc eax
mov dword [esp], eax
jmp 0x40b6f4
mov eax, ecx
mov edx, 0x66666667
imul edx
mov eax, edx
sar edx, 1
shr eax, 0x1f
add edx, eax
lea eax, [edx + edx*4]
cmp ecx, eax
je 0x40b79d
mov eax, dword [esp]
mov ecx, 0x2e8ba2e9
add eax, 0xb
imul ecx
mov eax, edx
sar edx, 2
shr eax, 0x1f
add edx, eax
mov dword [esp], edx
jmp 0x40b763
inc eax
mov dword [esp], eax
mov ecx, dword [esp]
mov eax, ecx
imul ebx
mov eax, edx
shr eax, 0x1f
add eax, edx
lea eax, [eax + eax*2]
cmp ecx, eax
jne 0x40b79d
mov ecx, dword [esp]
mov edx, 0x66666667
mov eax, ecx
imul edx
mov eax, edx
sar edx, 1
shr eax, 0x1f
add edx, eax
lea eax, [edx + edx*4]
cmp ecx, eax
mov eax, dword [esp]
jne 0x40b75f
dec eax
mov dword [esp], eax
jmp 0x40b763
push 0xa4
push ebp
call fcn.00418e70
add esp, 8
push ebp
mov edi, dword [esp + 0xc]
push dword [edi + 4]
call fcn.0040bb50
add esp, 8
test eax, eax
je 0x40b7cd
push edi
call fcn.00415bd0
add esp, 4
jmp 0x40ba45
push 0x50
push ebp
call fcn.00418e70
add esp, 8
push ebp
push dword [edi + 4]
call fcn.0040bb50
add esp, 8
test eax, eax
je 0x40b7ff
push edi
call fcn.0041e300
add esp, 4
xor eax, eax
test esi, esi
setg al
sub esi, eax
jmp 0x40ba45
push 0x98
push ebp
call fcn.00418e70
add esp, 8
push ebp
push dword [edi + 4]
call fcn.0040bb50
add esp, 8
test eax, eax
je 0x40b91c
mov ebp, dword [edi + 8]
test ebp, ebp
je 0x40b90f
cmp byte [ebp], 0
je 0x40b90f
xor ecx, ecx
mov edx, 1
cmp byte [ebp + edx], 0
lea ebx, [edx + 1]
setne al
cmp edx, 0x200
setl ah
xor ah, al
jne 0x40b860
inc ecx
cmp edx, 0x200
mov edx, ebx
jl 0x40b83d
mov edi, dword [esp + 0xc]
lea eax, [ebx - 2]
cmp eax, 0x1fe
ja 0x40ad91
dec ebx
push ebx
push ebp
call fcn.00419bf0
add esp, 8
mov dword [esp], eax
mov ebx, dword [edi + 0x50]
test ebx, ebx
jne 0x40b89f
push 0x10
call fcn.00411090
add esp, 4
mov ebx, eax
mov ecx, ebx
push 4
call fcn.00413f20
mov dword [edi + 0x50], ebx
mov ecx, ebx
call fcn.0041eb20
test eax, eax
mov ebx, 0
mov dword [esp + 0x18], 0
je 0x40b8dc
xor ebx, ebx
mov ecx, dword [edi + 0x50]
push ebx
call fcn.00408f40
mov eax, dword [eax]
cmp eax, dword [esp]
je 0x40b8dc
mov ecx, dword [edi + 0x50]
mov eax, 0xffffffff
sub ebx, eax
call fcn.0041eb20
cmp ebx, eax
jb 0x40b8b9
mov ecx, dword [edi + 0x50]
call fcn.0041eb20
cmp ebx, eax
mov edx, 0
jne 0x40b8fd
mov ecx, dword [edi + 0x50]
mov eax, esp
push eax
call fcn.0040f030
mov edx, 1
mov ebp, 0xffffffff
mov dword [esp + 0x14], 0
jmp 0x40adf3
mov dword [esp + 0x18], 0
jmp 0x40ba45
push 0x57
push ebp
call fcn.00418e70
add esp, 8
push ebp
push dword [edi + 4]
call fcn.0040bb50
add esp, 8
test eax, eax
jne 0x40b956
mov word [esp + 0x30], 0x44
push ebp
mov eax, dword [esp + 0xc]
push dword [eax + 4]
call fcn.0040bb50
add esp, 8
test eax, eax
je 0x40adc3
mov edi, dword [esp + 0xc]
mov ecx, dword [edi + 0x4c]
test ecx, ecx
je 0x40ad9e
call fcn.0041eb20
test eax, eax
je 0x40adb2
xor ebp, ebp
mov dword [esp + 0x14], 1
mov ecx, dword [edi + 0x4c]
push ebp
call fcn.00408f40
mov ebx, eax
test ebx, ebx
je 0x40b9a4
mov eax, dword [esp + 8]
push dword [eax + 4]
push dword [ebx]
call fcn.0040bb50
add esp, 8
test eax, eax
jne 0x40add7
mov ecx, dword [edi + 0x4c]
inc ebp
call fcn.0041eb20
cmp ebp, eax
jb 0x40b97c
mov edx, 1
jmp 0x40adf3
mov eax, ecx
mov edx, 0x66666667
imul edx
mov eax, edx
sar edx, 1
shr eax, 0x1f
add edx, eax
lea eax, [edx + edx*4]
cmp ecx, eax
je 0x40ba34
xor ecx, ecx
mov eax, 0xb
add ebx, 0x18
sub ecx, dword [esp]
sub eax, ecx
cdq
idiv ebx
mov dword [esp], eax
mov ecx, dword [esp]
mov eax, ecx
imul ebp
jmp 0x40ba01
mov dword [esp], eax
mov edi, 0x55555556
mov ecx, dword [esp]
mov eax, ecx
imul edi
mov eax, edx
shr eax, 0x1f
add eax, edx
lea eax, [eax + eax*2]
cmp ecx, eax
jne 0x40ba34
mov ecx, dword [esp]
mov edx, 0x66666667
mov eax, ecx
imul edx
mov eax, edx
sar edx, 1
shr eax, 0x1f
add edx, eax
lea eax, [edx + edx*4]
cmp ecx, eax
mov eax, dword [esp]
je 0x40ba31
inc eax
jmp 0x40b9f2
dec eax
jmp 0x40b9f2
push dword [esp + 8]
call fcn.0041e300
add esp, 4
mov ebx, 0x55555556
mov ecx, dword [0x421a70]
inc esi
call fcn.0041eb20
cmp esi, eax
jl 0x40af27
mov eax, dword [esp + 8]
test eax, eax
je 0x40ba76
push eax
call fcn.004061e0
add esp, 4
push dword [esp + 0x1c]
call fcn.004193e0
add esp, 4
mov eax, 1
add esp, 0x130
pop esi
pop edi
pop ebx
pop ebp
ret