Function at 0x40a5f0
Capabilities:
Encode data using xor
Resolve function by parsing pe exports

Disassembly:
sub esp, 8
push ebx
push ebp
mov ebx, edx
mov edx, ecx
push esi
push edi
mov dword [esp + 0x10], edx
lea edi, [ebx + 1]
mov eax, edi
mov dword [edx + 0x1c], edi
shl eax, 5
lea esi, [edx + 0xbcac]
add esi, eax
add eax, 0xbcb0
add eax, edx
lea esp, [esp]
mov ecx, ebx
shl ecx, 5
mov ebp, dword [ecx + edx + 0xbcb0]
mov edx, dword [ecx + edx + 0xbcac]
sub ebx, edx
mov dword [esp + 0x14], ebp
mov ebp, dword [esp + 0x10]
movzx ecx, word [ecx + ebp + 0xbcaa]
mov ebp, dword [esp + 0x14]
test ecx, ecx
je 0x40a5c2
sub esi, 0x20
dec edi
sub eax, 0x20
sub ebx, ecx
mov dword [esi], edx
mov edx, ecx
cmp ecx, 1
jne 0x40a5a6
mov dword [eax], ebp
or ebp, 0xffffffff
jmp 0x40a5c2
mov dword [eax], 0
lea edx, [ecx - 1]
sub eax, 0x20
dec edi
sub esi, 0x20
mov dword [eax], 0xffffffff
mov dword [esi], 1
test ebx, ebx
je 0x40a5d8
sub eax, 0x20
mov dword [esi - 0x20], edx
mov edx, dword [esp + 0x10]
dec edi
sub esi, 0x20
mov dword [eax], ebp
jmp 0x40a560
mov eax, dword [esp + 0x10]
mov dword [eax + 0x18], edi
pop edi
pop esi
mov dword [eax + 0x90], ebp
mov eax, edx
pop ebp
pop ebx
add esp, 8
ret
sub esp, 0x88
push ebx
push esi
mov esi, ecx
mov dword [esp + 0x40], edx
mov dword [esp + 0x4c], esi
cmp dword [esi + 0x34], 0
mov dword [esi + 0x1c], 0
mov dword [esi + 0x18], 0
jne 0x40a629
lea edx, [esp + 0x34]
call fcn.0040a4a0
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x34]
jmp 0x40a633
mov eax, dword [esi + 0x20]
mov dword [esp + 0x24], eax
mov eax, dword [esi + 0x24]
mov ebx, dword [esi + 0x28]
mov dword [esp + 0x14], eax
cmp ebx, 2
jae 0x40a657
mov dword [esi + 0x90], 0xffffffff
mov eax, 1
pop esi
pop ebx
add esp, 0x88
ret
mov eax, 0x111
cmp ebx, eax
push edi
push dword [esi]
cmova ebx, eax
mov eax, dword [esi + 0xc]
call eax
xor ecx, ecx
mov dword [esp + 0x20], 0
lea edi, [esi + 0x38]
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], edi
xor esi, esi
lea edx, [eax - 1]
mov al, byte [edx]
mov dword [esp + 0x14], edx
mov byte [esp + 0xe], al
push ebp
mov edi, edi
mov eax, dword [edi + ecx*4]
lea ebp, [ecx*4]
mov edi, edx
mov dword [esp + ebp + 0x58], eax
sub edi, eax
mov al, byte [esp + 0x12]
cmp al, byte [edi]
jne 0x40a6f3
mov al, byte [edx + 1]
cmp al, byte [edi + 1]
jne 0x40a6f3
mov edx, 2
cmp ebx, edx
jbe 0x40a6d5
mov eax, dword [esp + 0x18]
sub edi, eax
lea ecx, [eax + 2]
mov al, byte [ecx]
cmp al, byte [edi + ecx]
jne 0x40a6d1
inc edx
inc ecx
cmp edx, ebx
jb 0x40a6c4
mov ecx, dword [esp + 0x38]
mov dword [esp + ebp + 0x88], edx
cmp edx, dword [esp + esi + 0x88]
mov edx, dword [esp + 0x18]
jbe 0x40a6fe
mov eax, ecx
mov esi, ebp
mov dword [esp + 0x24], eax
jmp 0x40a702
mov dword [esp + ebp + 0x88], 0
mov eax, dword [esp + 0x24]
mov edi, dword [esp + 0x3c]
inc ecx
mov dword [esp + 0x38], ecx
cmp ecx, 4
jb 0x40a690
mov esi, dword [esp + 0x54]
mov edi, dword [esp + eax*4 + 0x88]
mov ecx, dword [esi + 0x30]
cmp edi, ecx
jb 0x40a746
lea ecx, [edi - 1]
mov dword [esi + 0x90], eax
add dword [esi + 0x34], ecx
lea ecx, [edi - 1]
push ecx
push dword [esi]
mov ecx, dword [esi + 0x14]
call ecx
pop ebp
mov eax, edi
pop edi
pop esi
pop ebx
add esp, 0x88
ret
mov ebp, dword [esp + 0x2c]
cmp ebp, ecx
jb 0x40a780
mov eax, dword [esp + 0x1c]
mov eax, dword [esi + eax*4 + 0x944]
add eax, 4
mov dword [esi + 0x90], eax
lea eax, [ebp - 1]
add dword [esi + 0x34], eax
lea eax, [ebp - 1]
push eax
push dword [esi]
mov eax, dword [esi + 0x14]
call eax
mov eax, ebp
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x88
ret
mov ecx, dword [esp + 0x58]
mov eax, edx
mov bl, byte [esp + 0x12]
sub eax, ecx
cmp edi, ebp
mov dword [esp + 0x50], ecx
cmovbe edi, ebp
mov bh, byte [eax]
mov dword [esp + 0x28], edi
cmp edi, 2
jae 0x40a7be
cmp bl, bh
je 0x40a7be
pop ebp
pop edi
mov dword [esi + 0x90], 0xffffffff
mov eax, 1
pop esi
pop ebx
add esp, 0x88
ret
mov ax, word [esi + 0x2c]
mov word [esi + 0xbca8], ax
mov eax, dword [esi + 0x4c]
and eax, dword [esp + 0x48]
movzx edx, byte [edx - 1]
mov ecx, dword [esi + 0x94]
mov ebp, dword [esi + 0x2c]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x48]
shl eax, 8
add edx, eax
mov eax, dword [esi + 0x50]
and edx, dword [esi + 0x48]
shl edx, cl
lea ecx, [edx + edx*2]
movzx edx, bl
lea ecx, [eax + ecx*2]
lea eax, [esi + 0x748]
push eax
cmp ebp, 7
jb 0x40a812
movzx eax, bh
push eax
call fcn.00409f60
jmp 0x40a817
call fcn.00409f20
mov ecx, eax
shl ebp, 4
add ebp, dword [esp + 0x30]
movzx eax, word [esi + ebp*2 + 0x1e9c]
mov ebp, dword [esp + 0x30]
shr eax, 4
mov eax, dword [esi + eax*4 + 0x748]
add eax, ecx
mov dword [esi + 0xbcd0], 0xffffffff
mov dword [esi + 0xbcc4], eax
xor eax, eax
mov word [esi + 0xbcca], ax
mov edx, dword [esi + 0x2c]
mov ecx, edx
shl ecx, 4
add ecx, ebp
movzx eax, word [esi + ecx*2 + 0x1e9c]
xor eax, 0x7f0
shr eax, 4
mov eax, dword [esi + eax*4 + 0x748]
mov dword [esp + 0x14], eax
movzx eax, word [esi + edx*2 + 0x1e3c]
xor eax, 0x7f0
shr eax, 4
mov eax, dword [esi + eax*4 + 0x748]
add eax, dword [esp + 0x14]
mov dword [esp + 0x38], eax
cmp bh, bl
jne 0x40a90d
cmp dword [esp + 0x88], 0
jne 0x40a90d
movzx ecx, word [esi + ecx*2 + 0x201c]
movzx eax, word [esi + edx*2 + 0x1e54]
shr ecx, 4
shr eax, 4
mov ecx, dword [esi + ecx*4 + 0x748]
add ecx, dword [esi + eax*4 + 0x748]
add ecx, dword [esp + 0x38]
cmp ecx, dword [esi + 0xbcc4]
jae 0x40a8ec
xor eax, eax
mov dword [esi + 0xbcc4], ecx
mov dword [esi + 0xbcd0], 0
mov word [esi + 0xbcca], ax
cmp edi, 2
jae 0x40a90d
mov eax, dword [esi + 0xbcd0]
pop ebp
pop edi
mov dword [esi + 0x90], eax
mov eax, 1
pop esi
pop ebx
add esp, 0x88
ret
mov eax, dword [esp + 0x50]
xor ebx, ebx
mov dword [esi + 0xbccc], 1
mov dword [esi + 0xbcb4], eax
mov eax, dword [esp + 0x5c]
mov dword [esi + 0xbcb8], eax
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x60]
mov dword [esi + 0xbcbc], eax
mov eax, dword [esp + 0x64]
mov dword [esi + 0xbcc0], eax
jmp 0x40a950
mov edx, dword [esp + ebx*4 + 0x88]
cmp edx, 2
jb 0x40aa3c
mov eax, dword [esi + 0x2c]
movzx ecx, word [esi + eax*2 + 0x1e54]
test ebx, ebx
jne 0x40a997
shl eax, 4
add eax, ebp
shr ecx, 4
movzx eax, word [esi + eax*2 + 0x201c]
xor eax, 0x7f0
shr eax, 4
mov ebp, dword [esi + eax*4 + 0x748]
add ebp, dword [esi + ecx*4 + 0x748]
jmp 0x40a9f3
movzx edi, word [esi + eax*2 + 0x1e6c]
xor ecx, 0x7f0
shr ecx, 4
mov ebp, dword [esi + ecx*4 + 0x748]
cmp ebx, 1
jne 0x40a9c0
shr edi, 4
add ebp, dword [esi + edi*4 + 0x748]
jmp 0x40a9f3
movzx ecx, word [esi + eax*2 + 0x1e84]
xor edi, 0x7f0
mov eax, 2
shr ecx, 4
sub eax, ebx
shr edi, 4
shr eax, 4
and eax, 0x7f
xor ecx, eax
mov eax, dword [esi + ecx*4 + 0x748]
add eax, dword [esi + edi*4 + 0x748]
add ebp, eax
imul eax, dword [esp + 0x30], 0x110
add ebp, dword [esp + 0x38]
add eax, 0x1e27
add eax, edx
lea edi, [esi + eax*4]
mov eax, edx
shl eax, 5
add eax, 0xbcb0
add eax, esi
mov ecx, dword [edi]
add ecx, ebp
cmp ecx, dword [eax - 0xc]
jae 0x40aa2c
mov dword [eax - 0xc], ecx
xor ecx, ecx
mov dword [eax - 4], edx
mov dword [eax], ebx
mov word [eax - 6], cx
dec edx
sub edi, 4
sub eax, 0x20
cmp edx, 2
jae 0x40aa15
mov ebp, dword [esp + 0x30]
inc ebx
cmp ebx, 4
jb 0x40a950
mov edi, dword [esp + 0x88]
inc edi
cmp edi, dword [esp + 0x2c]
ja 0x40ab71
mov eax, dword [esi + 0x2c]
xor ebp, ebp
movzx eax, word [esi + eax*2 + 0x1e3c]
shr eax, 4
mov eax, dword [esi + eax*4 + 0x748]
add eax, dword [esp + 0x14]
mov dword [esp + 0x3c], eax
cmp edi, 2
jae 0x40aa81
lea edi, [ebp + 2]
jmp 0x40aa9c
cmp edi, dword [esi + 0x948]
jbe 0x40aa9c
lea esp, [esp]
add ebp, 2
cmp edi, dword [esi + ebp*4 + 0x948]
ja 0x40aa90
imul eax, dword [esp + 0x30], 0x110
lea ecx, [esi + 0xbcb0]
add eax, 0xd26
add eax, edi
lea edx, [esi + eax*4]
mov eax, edi
shl eax, 5
add ecx, eax
mov ebx, dword [edx]
add ebx, dword [esp + 0x3c]
mov eax, dword [esi + ebp*4 + 0x94c]
mov dword [esp + 0x14], edx
lea edx, [edi - 2]
mov dword [esp + 0x44], ecx
mov dword [esp + 0x38], eax
cmp edi, 5
jb 0x40aae1
mov edx, 3
cmp eax, 0x80
jae 0x40aafd
shl edx, 7
and eax, 0x7f
add edx, eax
add ebx, dword [esi + edx*4 + 0x161c]
mov edx, dword [esp + 0x38]
jmp 0x40ab39
cmp eax, 0x20000
sbb ecx, ecx
shl edx, 5
and ecx, 0xfffffff6
add ecx, 0x10
shr eax, cl
add edx, ecx
movzx eax, byte [eax + esi + 0x2c9c]
lea eax, [eax + edx*2]
mov edx, dword [esp + 0x38]
mov eax, dword [esi + eax*4 + 0x121c]
mov ecx, edx
and ecx, 0xf
add eax, dword [esi + ecx*4 + 0x11dc]
mov ecx, dword [esp + 0x44]
add ebx, eax
cmp ebx, dword [ecx - 0xc]
jae 0x40ab4f
lea eax, [edx + 4]
mov dword [ecx - 0xc], ebx
mov dword [ecx], eax
xor eax, eax
mov dword [ecx - 4], edi
mov word [ecx - 6], ax
cmp edi, dword [esi + ebp*4 + 0x948]
jne 0x40ab61
add ebp, 2
cmp ebp, dword [esp + 0x1c]
je 0x40ab71
mov edx, dword [esp + 0x14]
inc edi
add edx, 4
add ecx, 0x20
jmp 0x40aabb
mov ebx, dword [esp + 0x28]
mov ebp, 1
mov dword [esp + 0x40], ebp
cmp ebx, ebp
je 0x40b81a
jmp 0x40ab90
cmp ebp, 0x7c0
jae 0x40b7d4
lea edx, [esp + 0x38]
mov ecx, esi
call fcn.0040a4a0
mov ecx, eax
mov dword [esp + 0x84], ecx
cmp ecx, dword [esi + 0x30]
jae 0x40b7c8
inc dword [esp + 0x48]
mov edi, ebp
shl edi, 5
mov ecx, ebp
add edi, esi
mov eax, dword [edi + 0xbcac]
sub ecx, eax
cmp eax, 1
jne 0x40ac17
mov ebx, dword [esp + 0x60]
shl ecx, 5
cmp dword [edi + 0xbcb0], 0
movzx eax, word [ecx + esi + 0xbca8]
mov ecx, dword [esp + 0x50]
jne 0x40ac03
movzx ebp, byte [eax + 0x4ffc5c]
mov eax, dword [esp + 0x64]
mov dword [esp + 0x34], ebp
jmp 0x40ace3
movzx ebp, byte [eax + 0x4ffc68]
mov eax, dword [esp + 0x64]
mov dword [esp + 0x34], ebp
jmp 0x40ace3
movzx ebx, word [edi + 0xbcaa]
mov edx, dword [edi + 0xbcb0]
test bx, bx
je 0x40ac45
sub ecx, ebx
mov ebp, 8
mov dword [esp + 0x34], ebp
cmp ebx, 1
jne 0x40ac6b
cmp edx, 4
sbb ebp, ebp
neg ebp
add ebp, 7
jmp 0x40ac67
mov eax, ecx
shl eax, 5
movzx eax, word [eax + esi + 0xbca8]
cmp edx, 4
jae 0x40ac60
movzx ebp, byte [eax + 0x4ffc44]
jmp 0x40ac67
movzx ebp, byte [eax + 0x4ffc50]
mov dword [esp + 0x34], ebp
shl ecx, 5
lea eax, [esi + 0xbca4]
add eax, ecx
mov ebx, dword [eax + 0x10]
mov dword [esp + 0x70], ebx
cmp edx, 4
jae 0x40acc2
test edx, edx
jne 0x40ac9b
mov ecx, ebx
mov ebx, dword [eax + 0x14]
mov dword [esp + 0x70], ebx
mov dword [esp + 0x5c], ebx
mov ebx, dword [eax + 0x18]
mov eax, dword [eax + 0x1c]
jmp 0x40acd3
mov ecx, dword [eax + 0x14]
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x50], ecx
cmp edx, 1
jne 0x40acb3
mov ebx, dword [eax + 0x18]
mov eax, dword [eax + 0x1c]
jmp 0x40acd7
mov ebx, ecx
mov ecx, dword [eax + edx*4 + 0x10]
xor edx, 1
mov eax, dword [eax + edx*4 + 0x10]
jmp 0x40acd3
mov dword [esp + 0x70], ebx
lea ecx, [edx - 3]
mov dword [esp + 0x5c], ebx
mov ebx, dword [eax + 0x14]
mov eax, dword [eax + 0x18]
mov dword [esp + 0x50], ecx
mov dword [esp + 0x64], eax
mov dword [esp + 0x60], ebx
mov dword [esp + 0x58], ecx
mov word [edi + 0xbca8], bp
mov dword [edi + 0xbcb4], ecx
mov ecx, dword [esp + 0x70]
mov dword [edi + 0xbcb8], ecx
mov dword [edi + 0xbcbc], ebx
mov dword [edi + 0xbcc0], eax
push dword [esi]
mov eax, dword [esi + 0xc]
call eax
mov ecx, dword [esi + 0x4c]
and ecx, dword [esp + 0x48]
mov edx, dword [edi + 0xbca4]
lea ebp, [eax - 1]
mov dword [esp + 0x3c], ecx
mov al, byte [ebp]
mov ebx, ebp
sub ebx, dword [esp + 0x50]
mov byte [esp + 0x13], al
mov dword [esp + 0x20], ebp
mov dword [esp + 0x18], ebx
mov al, byte [ebx]
mov byte [esp + 0x12], al
mov eax, dword [esp + 0x34]
shl eax, 4
add eax, ecx
mov dword [esp + 0x24], 0
mov dword [esp + 0x68], eax
movzx ecx, word [esi + eax*2 + 0x1e9c]
mov eax, ecx
shr ecx, 4
xor eax, 0x7f0
shr eax, 4
mov eax, dword [esi + eax*4 + 0x748]
add eax, edx
mov dword [esp + 0x54], eax
mov eax, dword [esi + ecx*4 + 0x748]
mov ecx, dword [edi + 0xbcc4]
add eax, edx
mov dword [esp + 0x1c], eax
cmp ecx, 0x40000000
jae 0x40ad98
mov dl, byte [esp + 0x12]
cmp dl, byte [esp + 0x13]
je 0x40ad9c
cmp eax, ecx
jbe 0x40ada7
xor edx, edx
mov dword [esp + 0x1c], edx
jmp 0x40ae66
mov eax, dword [esp + 0x48]
movzx edx, byte [ebp - 1]
mov ecx, dword [esi + 0x94]
shl eax, 8
add edx, eax
mov eax, dword [esi + 0x50]
and edx, dword [esi + 0x48]
shl edx, cl
cmp dword [esp + 0x34], 7
lea ecx, [edx + edx*2]
movzx edx, byte [esp + 0x13]
lea ecx, [eax + ecx*2]
mov dword [esp + 0x14], ecx
jb 0x40adee
lea eax, [esi + 0x748]
push eax
movzx eax, byte [esp + 0x16]
push eax
call fcn.00409f60
mov ebx, eax
jmp 0x40ae25
mov ebp, dword [esp + 0x14]
xor ebx, ebx
or edx, 0x100
lea ebx, [ebx]
mov ecx, edx
shr edx, 1
and ecx, 1
neg ecx
shr ecx, 4
movzx eax, word [ebp + edx*2]
and ecx, 0x7f
shr eax, 4
xor eax, ecx
add ebx, dword [esi + eax*4 + 0x748]
cmp edx, 2
jae 0x40ae00
mov edx, dword [esp + 0x1c]
add edx, ebx
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x1c], edx
cmp edx, dword [edi + 0xbcc4]
jae 0x40ae66
xor eax, eax
mov dword [edi + 0xbcc4], edx
mov dword [edi + 0xbccc], 1
mov dword [edi + 0xbcd0], 0xffffffff
mov word [edi + 0xbcca], ax
mov dword [esp + 0x24], 1
mov ecx, dword [esp + 0x34]
lea eax, [ecx + 0xf1e]
lea eax, [esi + eax*2]
mov dword [esp + 0x78], eax
movzx eax, word [eax]
xor eax, 0x7f0
shr eax, 4
mov eax, dword [esi + eax*4 + 0x748]
add eax, dword [esp + 0x54]
mov dword [esp + 0x44], eax
mov eax, dword [esi + 0x28]
mov dword [esp + 0x30], eax
mov eax, 0x7ff
sub eax, dword [esp + 0x40]
mov ebp, dword [esp + 0x30]
cmp ebp, eax
cmova ebp, eax
mov al, byte [esp + 0x13]
mov ah, byte [esp + 0x12]
mov dword [esp + 0x30], ebp
mov ebp, dword [esp + 0x20]
cmp ecx, 7
jae 0x40af50
cmp ah, al
jne 0x40af50
mov ebx, dword [esp + 0x44]
cmp ebx, dword [edi + 0xbcc4]
mov ebx, dword [esp + 0x18]
jae 0x40af50
cmp dword [edi + 0xbccc], 2
jb 0x40aeed
cmp dword [edi + 0xbcd0], 0
je 0x40af50
movzx ecx, word [esi + ecx*2 + 0x1e54]
mov eax, dword [esp + 0x68]
shr ecx, 4
movzx eax, word [esi + eax*2 + 0x201c]
mov ecx, dword [esi + ecx*4 + 0x748]
shr eax, 4
add ecx, dword [esi + eax*4 + 0x748]
add ecx, dword [esp + 0x44]
cmp ecx, dword [edi + 0xbcc4]
jae 0x40af48
xor eax, eax
mov dword [edi + 0xbcc4], ecx
mov dword [edi + 0xbccc], 1
mov dword [edi + 0xbcd0], 0
mov word [edi + 0xbcca], ax
mov dword [esp + 0x24], eax
mov ah, byte [esp + 0x12]
mov al, byte [esp + 0x13]
cmp dword [esp + 0x30], 2
jb 0x40b7b1
mov ecx, dword [esi + 0x30]
mov edi, ecx
cmp dword [esp + 0x30], ecx
cmovbe edi, dword [esp + 0x30]
cmp dword [esp + 0x24], 0
mov dword [esp + 0x2c], edi
jne 0x40b0b1
test edx, edx
je 0x40b0b1
cmp ah, al
je 0x40b0b1
mov edx, dword [esp + 0x30]
cmp edx, 2
jbe 0x40b0b1
mov al, byte [ebp + 1]
cmp al, byte [ebx + 1]
jne 0x40b0b1
mov al, byte [ebp + 2]
cmp al, byte [ebx + 2]
jne 0x40b0b1
lea edi, [ecx + 1]
cmp edi, edx
cmova edi, edx
mov edx, 3
mov dword [esp + 0x14], edx
cmp edi, edx
jbe 0x40afd8
lea ecx, [ebx + 3]
sub ebp, ebx
mov al, byte [ecx + ebp]
cmp al, byte [ecx]
jne 0x40afd4
inc edx
inc ecx
cmp edx, edi
jb 0x40afc7
mov dword [esp + 0x14], edx
mov eax, dword [esp + 0x34]
mov ebp, dword [esp + 0x48]
inc ebp
and ebp, dword [esi + 0x4c]
movzx edi, byte [eax + 0x4ffc68]
mov edx, edi
shl edx, 4
add edx, ebp
movzx ecx, word [esi + edi*2 + 0x1e3c]
xor ecx, 0x7f0
shr ecx, 4
movzx eax, word [esi + edx*2 + 0x201c]
xor eax, 0x7f0
shr eax, 4
mov ebx, dword [esi + ecx*4 + 0x748]
mov ecx, dword [esp + 0x40]
add ebx, dword [esi + eax*4 + 0x748]
movzx eax, word [esi + edx*2 + 0x1e9c]
mov edx, dword [esp + 0x14]
xor eax, 0x7f0
shr eax, 4
add ecx, edx
add ebx, dword [esi + eax*4 + 0x748]
movzx eax, word [esi + edi*2 + 0x1e54]
mov edi, dword [esp + 0x28]
shr eax, 4
add ebx, dword [esi + eax*4 + 0x748]
add ebx, dword [esp + 0x1c]
cmp edi, ecx
cmovb edi, ecx
imul eax, ebp, 0x110
mov ebp, dword [esp + 0x20]
dec edx
shl ecx, 5
mov dword [esp + 0x28], edi
mov edi, dword [esp + 0x2c]
add eax, edx
mov eax, dword [esi + eax*4 + 0x789c]
add eax, ebx
cmp eax, dword [ecx + esi + 0xbca4]
jae 0x40b0b1
mov dword [ecx + esi + 0xbca4], eax
mov eax, 1
mov dword [ecx + esi + 0xbcac], edx
mov dword [ecx + esi + 0xbcb0], 0
mov word [ecx + esi + 0xbcaa], ax
xor ecx, ecx
mov dword [esp + 0x18], 2
mov dword [esp + 0x4c], ecx
nop
mov al, byte [ebp]
mov ebx, ebp
sub ebx, dword [esp + ecx*4 + 0x58]
mov dword [esp + 0x14], ebx
cmp al, byte [ebx]
jne 0x40b3f5
mov al, byte [ebp + 1]
cmp al, byte [ebx + 1]
jne 0x40b3f5
mov edx, 2
mov dword [esp + 0x24], edx
cmp edi, edx
jbe 0x40b111
mov edi, ebp
lea ecx, [ebx + 2]
sub edi, ebx
mov ebx, dword [esp + 0x2c]
lea esp, [esp]
mov al, byte [ecx + edi]
cmp al, byte [ecx]
jne 0x40b10d
inc edx
inc ecx
cmp edx, ebx
jb 0x40b100
mov dword [esp + 0x24], edx
mov eax, dword [esp + 0x40]
mov edi, edx
mov ecx, dword [esp + 0x28]
add eax, edx
cmp ecx, eax
mov dword [esp + 0x7c], eax
cmovb ecx, eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x28], ecx
movzx ecx, word [esi + eax*2 + 0x1e54]
mov eax, dword [esp + 0x4c]
test eax, eax
jne 0x40b165
mov eax, dword [esp + 0x68]
shr ecx, 4
movzx eax, word [esi + eax*2 + 0x201c]
xor eax, 0x7f0
shr eax, 4
mov ebp, dword [esi + eax*4 + 0x748]
add ebp, dword [esi + ecx*4 + 0x748]
jmp 0x40b1c7
xor ecx, 0x7f0
shr ecx, 4
mov ebp, dword [esi + ecx*4 + 0x748]
mov ecx, dword [esp + 0x34]
movzx ebx, word [esi + ecx*2 + 0x1e6c]
cmp eax, 1
jne 0x40b192
shr ebx, 4
add ebp, dword [esi + ebx*4 + 0x748]
jmp 0x40b1c7
movzx ecx, word [esi + ecx*2 + 0x1e84]
mov eax, 2
sub eax, dword [esp + 0x4c]
xor ebx, 0x7f0
shr eax, 4
and eax, 0x7f
shr ecx, 4
xor ecx, eax
shr ebx, 4
mov eax, dword [esi + ecx*4 + 0x748]
add eax, dword [esi + ebx*4 + 0x748]
add ebp, eax
imul eax, dword [esp + 0x3c], 0x110
add ebp, dword [esp + 0x44]
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x6c], eax
add eax, 0x1e27
add eax, edx
mov edx, dword [esp + 0x4c]
lea ebx, [esi + eax*4]
mov eax, dword [esp + 0x7c]
shl eax, 5
add eax, 0xbcb0
add eax, esi
mov ecx, dword [ebx]
add ecx, ebp
cmp ecx, dword [eax - 0xc]
jae 0x40b20e
mov dword [eax - 0xc], ecx
xor ecx, ecx
mov dword [eax - 4], edi
mov dword [eax], edx
mov word [eax - 6], cx
dec edi
sub ebx, 4
sub eax, 0x20
cmp edi, 2
jae 0x40b1f7
test edx, edx
mov edx, dword [esp + 0x24]
jne 0x40b229
lea eax, [edx + 1]
mov dword [esp + 0x18], eax
mov eax, dword [esi + 0x30]
lea ebp, [edx + 1]
add eax, ebp
cmp eax, dword [esp + 0x30]
cmova eax, dword [esp + 0x30]
add ebp, 2
mov dword [esp + 0x80], eax
cmp ebp, eax
ja 0x40b3ed
mov ecx, dword [esp + 0x14]
mov ebx, dword [esp + 0x20]
add ecx, ebp
mov dword [esp + 0x74], ecx
mov al, byte [ebx + ebp - 2]
cmp al, byte [ecx - 2]
jne 0x40b3ed
lea eax, [ebx - 1]
mov dword [esp + 0x7c], eax
mov al, byte [eax + ebp]
cmp al, byte [ecx - 1]
jne 0x40b3ed
mov ecx, dword [esp + 0x48]
lea eax, [esi + 0x748]
mov edi, dword [esi + 0x4c]
add ecx, edx
push eax
mov eax, dword [esp + 0x18]
and edi, ecx
shl ecx, 8
movzx eax, byte [edx + eax]
push eax
mov eax, ebx
mov ebx, dword [esp + 0x84]
movzx edx, byte [edx + eax]
mov eax, dword [esp + 0x2c]
movzx eax, byte [eax + ebx]
add eax, ecx
mov ecx, dword [esi + 0x94]
and eax, dword [esi + 0x48]
shl eax, cl
lea ecx, [eax + eax*2]
mov eax, dword [esi + 0x50]
lea ecx, [eax + ecx*2]
call fcn.00409f60
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x24]
movzx ecx, byte [ecx + 0x4ffc44]
shl ecx, 4
add ecx, edi
movzx ecx, word [esi + ecx*2 + 0x1e9c]
shr ecx, 4
add eax, dword [esi + ecx*4 + 0x748]
mov ecx, dword [esp + 0x6c]
add ecx, edx
add eax, dword [esi + ecx*4 + 0x789c]
add dword [esp + 0x1c], eax
lea eax, [edi + 1]
and eax, dword [esi + 0x4c]
mov dword [esp + 0x6c], eax
mov edi, dword [esp + 0x80]
movzx ecx, word [esi + eax*2 + 0x20bc]
movzx eax, word [esi + eax*2 + 0x1f3c]
xor ecx, 0x7f0
xor eax, 0x7f0
shr ecx, 4
shr eax, 4
mov ecx, dword [esi + ecx*4 + 0x748]
add ecx, dword [esi + eax*4 + 0x748]
movzx eax, word [esi + 0x1e46]
xor eax, 0x7f0
shr eax, 4
add ecx, dword [esi + eax*4 + 0x748]
movzx eax, word [esi + 0x1e5e]
shr eax, 4
add ecx, dword [esi + eax*4 + 0x748]
add dword [esp + 0x1c], ecx
cmp ebp, edi
jae 0x40b38d
mov ebx, dword [esp + 0x20]
sub ebx, dword [esp + 0x14]
mov ecx, dword [esp + 0x74]
lea ebx, [ebx]
mov al, byte [ebx + ecx]
cmp al, byte [ecx]
jne 0x40b38d
inc ebp
inc ecx
cmp ebp, edi
jb 0x40b380
mov ebx, dword [esp + 0x28]
sub ebp, edx
lea ecx, [edx + ebp]
add ecx, dword [esp + 0x40]
cmp ebx, ecx
cmovb ebx, ecx
imul eax, dword [esp + 0x6c], 0x110
dec ebp
shl ecx, 5
mov dword [esp + 0x28], ebx
add eax, ebp
lea edi, [ecx + esi]
mov ecx, dword [esp + 0x4c]
mov eax, dword [esi + eax*4 + 0x789c]
add eax, dword [esp + 0x1c]
cmp eax, dword [edi + 0xbca4]
jae 0x40b3e7
mov dword [edi + 0xbca4], eax
lea eax, [edx + 1]
mov dword [edi + 0xbcac], ebp
mov word [edi + 0xbcaa], ax
mov dword [edi + 0xbcb0], ecx
mov ebp, dword [esp + 0x20]
jmp 0x40b3f9
mov ecx, dword [esp + 0x4c]
mov ebp, dword [esp + 0x20]
mov ebx, dword [esp + 0x28]
mov edi, dword [esp + 0x2c]
inc ecx
mov dword [esp + 0x4c], ecx
cmp ecx, 4
jb 0x40b0c0
mov ecx, edi
mov edi, dword [esp + 0x84]
cmp edi, ecx
jbe 0x40b440
xor eax, eax
mov edi, ecx
cmp ecx, dword [esi + 0x948]
jbe 0x40b430
add eax, 2
cmp ecx, dword [esi + eax*4 + 0x948]
ja 0x40b424
mov dword [esi + eax*4 + 0x948], ecx
add eax, 2
mov dword [esp + 0x38], eax
jmp 0x40b444
mov eax, dword [esp + 0x38]
mov dword [esp + 0x68], eax
cmp edi, dword [esp + 0x18]
jb 0x40b7b1
mov eax, dword [esp + 0x78]
movzx eax, word [eax]
shr eax, 4
mov edx, dword [esi + eax*4 + 0x748]
mov eax, dword [esp + 0x40]
add edx, dword [esp + 0x54]
add eax, edi
cmp ebx, eax
mov dword [esp + 0x6c], edx
cmovb ebx, eax
xor edi, edi
mov dword [esp + 0x28], ebx
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x2c], edi
cmp ebx, dword [esi + 0x948]
jbe 0x40b4a0
lea esp, [esp]
add edi, 2
cmp ebx, dword [esi + edi*4 + 0x948]
ja 0x40b490
mov dword [esp + 0x2c], edi
mov ebp, dword [esi + edi*4 + 0x94c]
cmp ebp, 0x20000
mov eax, ebp
mov edi, dword [esp + 0x2c]
sbb ecx, ecx
mov dword [esp + 0x54], ebp
and ecx, 0xfffffff6
add ecx, 0x10
shr eax, cl
movzx eax, byte [eax + esi + 0x2c9c]
lea eax, [eax + ecx*2]
mov dword [esp + 0x1c], eax
lea ecx, [ebx + 3]
mov eax, dword [esp + 0x48]
add eax, ebx
add ebx, 0xd26
shl eax, 8
mov dword [esp + 0x44], eax
imul eax, dword [esp + 0x3c], 0x110
add eax, ebx
lea ebx, [esi + eax*4]
mov eax, dword [esp + 0x18]
add eax, dword [esp + 0x40]
shl eax, 5
add eax, 0xbcb0
add eax, esi
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x20]
add eax, 0xfffffffd
mov dword [esp + 0x84], eax
mov dword [esp + 0x3c], ebx
lea eax, [ecx - 5]
mov ebx, dword [ebx]
add ebx, edx
mov dword [esp + 0x24], ecx
mov edx, 3
cmp eax, edx
cmovb edx, eax
cmp ebp, 0x80
jae 0x40b54b
mov eax, ebp
shl edx, 7
and eax, 0x7f
add edx, eax
add ebx, dword [esi + edx*4 + 0x161c]
jmp 0x40b56b
shl edx, 6
mov ecx, ebp
add edx, dword [esp + 0x1c]
and ecx, 0xf
mov eax, dword [esi + edx*4 + 0x121c]
add eax, dword [esi + ecx*4 + 0x11dc]
mov ecx, dword [esp + 0x24]
add ebx, eax
mov edx, dword [esp + 0x14]
mov dword [esp + 0x18], ebx
cmp ebx, dword [edx - 0xc]
jae 0x40b58c
lea eax, [ecx - 3]
mov dword [edx - 0xc], ebx
mov dword [edx - 4], eax
lea eax, [ebp + 4]
mov dword [edx], eax
xor eax, eax
mov word [edx - 6], ax
lea eax, [ecx - 3]
mov dword [esp + 0x80], eax
cmp eax, dword [esi + edi*4 + 0x948]
jne 0x40b791
mov edx, dword [esi + 0x30]
mov ebx, dword [esp + 0x20]
add edx, 0xfffffffe
sub ebx, ebp
add edx, ecx
dec ebx
mov ebp, ecx
cmp edx, dword [esp + 0x30]
mov dword [esp + 0x78], ebx
cmova edx, dword [esp + 0x30]
cmp ecx, edx
ja 0x40b750
mov eax, dword [esp + 0x20]
mov al, byte [ecx + eax - 2]
cmp al, byte [ebx + ecx - 2]
jne 0x40b750
mov eax, dword [esp + 0x20]
dec eax
mov dword [esp + 0x74], eax
mov al, byte [ecx + eax]
cmp al, byte [ebx + ecx - 1]
jne 0x40b750
cmp ecx, edx
jae 0x40b611
add ecx, dword [esp + 0x20]
mov edi, ebx
sub edi, dword [esp + 0x20]
nop
mov al, byte [ecx]
cmp al, byte [edi + ecx]
jne 0x40b60d
inc ebp
inc ecx
cmp ebp, edx
jb 0x40b600
mov ecx, dword [esp + 0x24]
mov edi, dword [esp + 0x48]
lea eax, [ecx - 3]
sub ebp, eax
add edi, 0xfffffffd
lea eax, [esi + 0x748]
add edi, ecx
push eax
mov eax, dword [esp + 0x7c]
and edi, dword [esi + 0x4c]
movzx eax, byte [eax + ecx - 3]
push eax
mov eax, dword [esp + 0x8c]
movzx edx, byte [eax + ecx]
mov eax, dword [esp + 0x7c]
movzx eax, byte [ecx + eax - 3]
add eax, dword [esp + 0x4c]
and eax, dword [esi + 0x48]
mov ecx, dword [esi + 0x94]
shl eax, cl
lea ecx, [eax + eax*2]
mov eax, dword [esi + 0x50]
lea ecx, [eax + ecx*2]
call fcn.00409f60
mov ecx, dword [esp + 0x34]
lea edx, [edi + 1]
and edx, dword [esi + 0x4c]
movzx ecx, byte [ecx + 0x4ffc50]
shl ecx, 4
add ecx, edi
mov edi, dword [esp + 0x80]
movzx ecx, word [esi + ecx*2 + 0x1e9c]
shr ecx, 4
add eax, dword [esi + ecx*4 + 0x748]
add dword [esp + 0x18], eax
movzx ecx, word [esi + edx*2 + 0x209c]
movzx eax, word [esi + edx*2 + 0x1f1c]
xor ecx, 0x7f0
xor eax, 0x7f0
shr ecx, 4
shr eax, 4
mov ebx, dword [esp + 0x18]
mov ecx, dword [esi + ecx*4 + 0x748]
add ecx, dword [esi + eax*4 + 0x748]
movzx eax, word [esi + 0x1e44]
xor eax, 0x7f0
shr eax, 4
add ecx, dword [esi + eax*4 + 0x748]
movzx eax, word [esi + 0x1e5c]
shr eax, 4
add ecx, dword [esi + eax*4 + 0x748]
mov eax, dword [esp + 0x28]
add ebx, ecx
lea ecx, [edi + ebp]
add ecx, dword [esp + 0x40]
cmp eax, ecx
cmovb eax, ecx
dec ebp
mov dword [esp + 0x28], eax
imul eax, edx, 0x110
shl ecx, 5
add eax, ebp
mov eax, dword [esi + eax*4 + 0x789c]
add eax, ebx
cmp eax, dword [ecx + esi + 0xbca4]
jae 0x40b74c
mov dword [ecx + esi + 0xbca4], eax
lea eax, [edi + 1]
mov word [ecx + esi + 0xbcaa], ax
mov eax, dword [esp + 0x54]
add eax, 4
mov dword [ecx + esi + 0xbcac], ebp
mov dword [ecx + esi + 0xbcb0], eax
mov edi, dword [esp + 0x2c]
add edi, 2
mov dword [esp + 0x2c], edi
cmp edi, dword [esp + 0x68]
je 0x40b7b1
mov ebp, dword [esi + edi*4 + 0x94c]
cmp ebp, 0x20000
mov edx, dword [esp + 0x14]
mov eax, ebp
sbb ecx, ecx
mov dword [esp + 0x54], ebp
and ecx, 0xfffffff6
add ecx, 0x10
shr eax, cl
movzx eax, byte [eax + esi + 0x2c9c]
lea eax, [eax + ecx*2]
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x1c], eax
mov ebx, dword [esp + 0x3c]
add edx, 0x20
add dword [esp + 0x44], 0x100
add ebx, 4
mov dword [esp + 0x14], edx
inc ecx
mov edx, dword [esp + 0x6c]
jmp 0x40b517
mov ebp, dword [esp + 0x40]
mov ebx, dword [esp + 0x28]
inc ebp
mov dword [esp + 0x40], ebp
cmp ebp, ebx
jne 0x40ab90
jmp 0x40b81a
mov eax, dword [esp + 0x38]
mov dword [esi + 0x24], eax
mov dword [esi + 0x20], ecx
jmp 0x40b81a
mov ecx, dword [esp + 0x40]
mov eax, ebp
shl eax, 5
inc ecx
mov edi, dword [eax + esi + 0xbca4]
cmp ecx, ebx
ja 0x40b807
mov eax, ecx
shl eax, 5
add eax, 0xbca4
add eax, esi
mov edx, dword [eax]
cmp edi, edx
jb 0x40b7ff
mov edi, edx
mov ebp, ecx
inc ecx
add eax, 0x20
cmp ecx, ebx
jbe 0x40b7f5
mov eax, ebp
sub eax, dword [esp + 0x40]
je 0x40b81a
add dword [esi + 0x34], eax
push eax
push dword [esi]
mov eax, dword [esi + 0x14]
call eax
mov eax, ebx
shl eax, 5
add eax, 0xbca4
add eax, esi
mov dword [eax], 0x40000000
sub eax, 0x20
dec ebx
jne 0x40b826
mov edx, ebp
mov ecx, esi
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x88
jmp 0x40a530