Function at 0x40d7c0
Capabilities:
Inspect section memory permissions

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x515c
call fcn.0041ead0
mov eax, dword [0x70f200]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0x10]
mov ecx, dword [ebp + 8]
push ebx
mov eax, dword [ebp + 0x1c]
push esi
push edi
mov edi, edx
mov dword [ebp - 0x50c8], edx
mov edx, dword [ebp + 0x14]
mov dword [ebp - 0x50bc], ecx
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x50d4], eax
lea ebx, [edx + edx]
mov dword [ebp - 0x50c4], ecx
mov dword [ebp - 0x5114], ebx
add ebx, ecx
mov esi, ebx
mov dword [ebp - 0x5118], ebx
mov dword [ebp - 0x50dc], edx
mov dword [ebp - 0x50d0], 0
mov dword [ebp - 0x50e0], 0
lea ebx, [esi - 2]
mov dword [ebp - 0x50fc], 0
mov dword [ebp - 0x50ec], ebx
xor ebx, ebx
mov dword [ebp - 0x510c], ebx
lea ebx, [ebp - 0x5004]
mov dword [ebp - 0x5098], ebx
mov ebx, edi
mov dword [ebp - 0x50c0], 0
mov dword [ebp - 0x50cc], 0
mov dword [ebp - 0x50e4], 0
mov dword [ebp - 0x50d8], 0
mov dword [ebp - 0x50f0], 0
cmp ebx, 0xffffffff
jne 0x40d8b1
push ecx
call fcn.0041aa30
mov ecx, dword [ebp - 0x50c4]
add esp, 4
mov dword [ebp - 0x50c8], eax
mov eax, dword [ebp - 0x50d4]
mov ebx, dword [ebp - 0x50c8]
xor edx, edx
lea ebx, [ecx + ebx*2]
cmp edi, 0xffffffff
mov dword [ebp - 0x50b8], ebx
sete dl
test dword [ebp + 0x18], 0x1fff9fc0
mov dword [ebp - 0x511c], edx
mov edx, dword [ebp - 0x50dc]
jne 0x40e8ae
mov edi, dword [ebp - 0x50bc]
test edi, edi
je 0x40e898
test ecx, ecx
je 0x40e898
test eax, eax
je 0x40e898
cmp edx, dword [ebp - 0x50c8]
jbe 0x40d917
pop edi
pop esi
mov eax, 0xffffffdf
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041e1b5
mov esp, ebp
pop ebp
ret
cmp dword [edi + 0x38], 0x50435245
je 0x40d936
pop edi
pop esi
mov eax, 0xffffffe1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041e1b5
mov esp, ebp
pop ebp
ret
mov ecx, dword [edi + 0x48]
mov eax, ecx
and al, 7
cmp al, 2
je 0x40d957
pop edi
pop esi
mov eax, 0xffffffe0
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041e1b5
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x18]
shr ecx, 0xe
and ecx, 0xc
or eax, ecx
mov ecx, dword [edi + 0x40]
mov edi, ecx
mov dword [ebp + 0x18], eax
shr edi, 0x13
and edi, 1
mov dword [ebp - 0x50b4], edi
test al, 0x20
je 0x40d981
mov eax, 2
jmp 0x40d987
shr eax, 4
and eax, 1
movzx eax, ax
mov word [ebp - 0x5068], ax
test ax, ax
mov eax, dword [ebp + 0x18]
je 0x40d9a7
or ecx, eax
test ecx, 0x20000000
jne 0x40e8ae
mov dword [ebp - 0x5110], 0xfc00
mov dword [ebp - 0x50f4], 0xdc00
test edi, edi
je 0x40da91
test eax, 0x40000000
jne 0x40da91
mov ecx, esi
test edx, edx
je 0x40da4b
cmp esi, ebx
jae 0x40da03
mov ax, word [esi]
mov edx, 0xfc00
and ax, dx
mov edx, 0xdc00
cmp ax, dx
jne 0x40da03
pop edi
pop esi
mov eax, 0xffffffdc
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041e1b5
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp - 0x50bc]
movzx edx, word [edi + 0x64]
test edx, edx
je 0x40da4b
mov ebx, dword [ebp - 0x50c4]
cmp ecx, ebx
jbe 0x40da4b
sub ecx, 2
cmp ecx, ebx
jbe 0x40da46
mov edi, 0xfc00
nop word [eax + eax]
mov ax, word [ecx]
and ax, di
cmp ax, word [ebp - 0x50f4]
jne 0x40da46
sub ecx, 2
cmp ecx, ebx
ja 0x40da30
sub edx, 1
jne 0x40da17
mov ebx, dword [ebp - 0x50d4]
mov edi, ecx
sub edi, dword [ebp - 0x50c4]
add ebx, 0x20
mov eax, dword [ebp - 0x50c8]
sar edi, 1
push ebx
sub eax, edi
push eax
push ecx
call fcn.0041aad0
mov ecx, dword [ebp - 0x50d4]
add esp, 0xc
mov dword [ecx + 0x28], eax
test eax, eax
je 0x40da91
add dword [ebx], edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041e1b5
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp + 0x20]
test edi, edi
je 0x40dac3
cmp dword [edi + 0x1c], 0xffffffff
je 0x40dac3
mov eax, dword [ebp - 0x50bc]
test dword [eax + 0x40], 0x800000
jne 0x40dac3
pop edi
pop esi
mov eax, 0xffffffc8
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041e1b5
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp - 0x50d4]
test byte [ebx + 0x25], 1
je 0x40dae1
push dword [ebx + 8]
mov eax, dword [ebx + 4]
push dword [ebx + 0x10]
call eax
add esp, 8
and byte [ebx + 0x25], 0xfe
mov dword [ebx + 0x10], 0
test edi, edi
jne 0x40db07
mov eax, dword [ebp - 0x50bc]
mov edx, dword [eax + 8]
movq xmm0, qword [eax]
mov dword [ebp - 0x50e8], edx
mov dword [ebp - 0x50a8], edx
jmp 0x40db20
mov eax, dword [edi + 8]
movq xmm0, qword [edi]
mov dword [ebp - 0x50e8], eax
mov dword [ebp - 0x50a8], eax
mov eax, dword [ebp - 0x50bc]
mov ecx, dword [eax + 0x40]
test edi, edi
mov ebx, 0x60608c
movq qword [ebp - 0x50b0], xmm0
cmovne ebx, edi
mov edx, ecx
or edx, dword [ebp + 0x18]
mov edi, dword [eax + 0x48]
shr edx, 0x1f
mov eax, dword [ebx + 0x1c]
mov dword [ebp - 0x5108], edx
mov edx, ecx
shr edx, 8
and edx, 1
mov dword [ebp - 0x50f8], edi
mov dword [ebp - 0x5104], edx
mov edx, dword [ebp - 0x50c4]
cmp eax, 0xffffffff
jne 0x40db70
mov eax, dword [ebp - 0x50b8]
jmp 0x40db73
lea eax, [edx + eax*2]
mov dword [ebp - 0x5100], eax
lea eax, [ebp - 0x515c]
mov dword [ebp - 0x5010], eax
mov eax, dword [ebp - 0x50c8]
mov dword [ebp - 0x5140], eax
mov eax, dword [ebx + 0xc]
mov dword [ebp - 0x5008], eax
mov eax, dword [ebx + 0x10]
mov dword [ebp - 0x500c], eax
mov eax, dword [ebp - 0x50dc]
mov dword [ebp - 0x5070], eax
mov eax, dword [ebp - 0x50b8]
mov dword [ebp - 0x5054], eax
mov eax, edi
shr eax, 0xc
and eax, 1
mov dword [ebp - 0x5144], edx
mov dword [ebp - 0x5080], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x5030], eax
mov eax, dword [ebp - 0x50bc]
mov dword [ebp - 0x5058], edx
mov dword [ebp - 0x515c], 2
mov dword [ebp - 0x5120], 0
movzx edx, word [eax + 0x6e]
lea edi, [eax + 0x70]
movzx eax, word [eax + 0x6c]
mov word [ebp - 0x5062], ax
imul eax, edx
mov dword [ebp - 0x5060], edi
mov dword [ebp - 0x502c], ecx
mov dword [ebp - 0x5024], 0
mov dword [ebp - 0x5040], 0
mov dword [ebp - 0x5044], 0
mov dword [ebp - 0x5084], 0
mov word [ebp - 0x5064], dx
lea eax, [edi + eax*2]
mov dword [ebp - 0x5020], 0
mov edi, dword [ebp - 0x50bc]
mov dword [ebp - 0x505c], eax
mov ax, word [edi + 0x60]
mov word [ebp - 0x5066], ax
movzx eax, word [edi + 0x62]
dec eax
cmp eax, 5
ja case.default.0x40dc7a
jmp dword [eax*4 + 0x40e8c4]
mov eax, 0xd
mov dword [ebp - 0x501c], 1
mov word [ebp - 0x5018], ax
jmp 0x40dcf2
mov eax, 0xa
mov dword [ebp - 0x501c], 1
mov word [ebp - 0x5018], ax
jmp 0x40dcf2
xor eax, eax
mov dword [ebp - 0x501c], 1
mov word [ebp - 0x5018], ax
jmp 0x40dcf2
mov dword [ebp - 0x501c], 2
mov dword [ebp - 0x5018], 0xa000d
jmp 0x40dcf2
mov dword [ebp - 0x5020], 1
jmp 0x40dcf2
mov dword [ebp - 0x5020], 2
mov edx, dword [ebx + 0x20]
cmp edx, dword [edi + 0x4c]
mov ecx, dword [ebx + 0x24]
cmovae edx, dword [edi + 0x4c]
cmp ecx, dword [edi + 0x50]
movzx eax, word [edi + 0x68]
cmovae ecx, dword [edi + 0x50]
mov dword [ebp - 0x5090], ecx
mov ecx, dword [ebx + 0x28]
cmp ecx, dword [edi + 0x54]
lea eax, [eax*8 + 0x54]
mov ebx, eax
mov dword [ebp - 0x50dc], eax
cmovae ecx, dword [edi + 0x54]
mov dword [ebp - 0x5094], edx
mov dword [ebp - 0x508c], ecx
cmp ebx, 0x800
ja 0x40dd5e
mov ecx, 0x5000
mov edi, dword [ebp - 0x5098]
mov eax, ecx
mov dword [ebp - 0x50a0], edi
xor edx, edx
div ebx
sub ecx, edx
mov dword [ebp - 0x50a4], ecx
jmp 0x40ddc5
lea ecx, [ebx + ebx*4]
add ecx, ecx
mov eax, ecx
mov dword [ebp - 0x50a4], ecx
shr eax, 0xa
cmp eax, edx
jbe 0x40dd9f
mov ecx, edx
shl ecx, 0xa
cmp ebx, ecx
jbe 0x40dd91
pop edi
pop esi
mov eax, 0xffffffc1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041e1b5
mov esp, ebp
pop ebp
ret
mov eax, ecx
xor edx, edx
div ebx
sub ecx, edx
mov dword [ebp - 0x50a4], ecx
push dword [ebp - 0x50e8]
push ecx
call dword [ebp - 0x50b0]
mov edi, eax
add esp, 8
mov dword [ebp - 0x50a0], edi
test edi, edi
je 0x40e86c
mov ecx, dword [ebp - 0x50a4]
mov eax, dword [ebp - 0x50bc]
add ecx, edi
mov dword [ebp - 0x509c], ecx
movzx eax, word [eax + 0x68]
shl eax, 3
push eax
lea eax, [edi + 0x54]
push 0xff
push eax
call fcn.00420090
mov edx, dword [ebp - 0x50bc]
add esp, 0xc
mov eax, dword [edx + 0xc]
mov ebx, dword [edx + 0x48]
mov dword [ebp - 0x507c], eax
lea edi, [eax + 0x100]
add eax, 0x340
mov dword [ebp - 0x5078], edi
mov dword [ebp - 0x5074], eax
test bl, 0x10
je 0x40deb0
movzx ecx, word [edx + 0x58]
mov dword [ebp - 0x50cc], ecx
movzx eax, cx
movzx ecx, cx
mov dword [ebp - 0x50e0], 1
mov dword [ebp - 0x50c0], ecx
test bl, 0x20
je 0x40deda
mov ecx, eax
mov eax, 0xff
cmp word [ebp - 0x50cc], ax
ja 0x40de61
movzx eax, byte [edi + ecx]
mov dword [ebp - 0x50cc], eax
mov edx, ecx
and edx, 0x7f
cmp dword [ebp - 0x50b4], 0
je 0x40dece
cmp word [ebp - 0x50c0], 0x7f
jbe 0x40dece
shr ecx, 7
movzx eax, word [ecx*2 + 0x608ff0]
mov ecx, dword [ebp - 0x50c0]
shl eax, 7
add eax, edx
movzx eax, word [eax*2 + 0x60d3f0]
lea eax, [eax + eax*2]
mov ax, word [eax*4 + 0x606474]
add ax, cx
movzx edx, ax
mov dword [ebp - 0x50cc], edx
jmp 0x40ded4
xor ecx, ecx
test dword [ebp - 0x50f8], 0x200
jne 0x40deda
test bl, 0x40
je 0x40deda
lea eax, [edx + 0x14]
mov dword [ebp - 0x50d0], eax
jmp 0x40deda
mov ecx, dword [ebp - 0x50c0]
mov edx, dword [ebp - 0x50bc]
movzx eax, cx
mov dword [ebp - 0x50e8], eax
test bl, bl
jns 0x40df72
movzx edx, word [edx + 0x5c]
movzx ecx, dx
mov dword [ebp - 0x50fc], 1
mov dword [ebp - 0x50d8], edx
movzx eax, dx
mov dword [ebp - 0x50e4], ecx
test ebx, 0x100
je 0x40df72
mov ecx, eax
mov eax, 0xff
cmp dx, ax
ja 0x40df29
movzx eax, byte [edi + ecx]
mov dword [ebp - 0x50d8], eax
mov edx, ecx
and edx, 0x7f
cmp dword [ebp - 0x50b4], 0
je 0x40df72
mov ebx, dword [ebp - 0x50e4]
cmp bx, 0x7f
jbe 0x40df72
shr ecx, 7
movzx eax, word [ecx*2 + 0x608ff0]
shl eax, 7
add eax, edx
movzx eax, word [eax*2 + 0x60d3f0]
lea eax, [eax + eax*2]
mov ax, word [eax*4 + 0x606474]
add ax, bx
movzx eax, ax
mov dword [ebp - 0x50d8], eax
mov ecx, dword [ebp - 0x50b8]
nop dword [eax + eax]
mov edx, dword [ebp - 0x50bc]
test dword [edx + 0x40], 0x10000
jne 0x40e52a
cmp dword [ebp - 0x5104], 0
mov ebx, dword [ebp - 0x5054]
je 0x40e113
mov edi, esi
cmp esi, ecx
jae 0x40e10b
mov edx, dword [ebp - 0x50b4]
test edx, edx
je 0x40e076
nop
mov eax, dword [ebp - 0x5020]
test eax, eax
je 0x40e035
mov ecx, dword [ebp - 0x5054]
cmp edi, ecx
jae 0x40e06e
push edx
lea edx, [ebp - 0x501c]
push edx
push ecx
push eax
push edi
call fcn.0041a290
mov ebx, dword [ebp - 0x5054]
add esp, 0x14
test eax, eax
jne 0x40e10b
mov edx, dword [ebp - 0x50b4]
mov ecx, dword [ebp - 0x50b8]
add edi, 2
cmp edi, ecx
jae 0x40e10b
mov ax, word [edi]
and ax, word [ebp - 0x5110]
cmp ax, word [ebp - 0x50f4]
jne 0x40e026
add edi, 2
cmp edi, ecx
jb 0x40dfc0
mov dword [ebp - 0x50b8], edi
jmp 0x40e119
mov edx, dword [ebp - 0x501c]
mov ecx, ebx
lea eax, [edx + edx]
sub ecx, eax
cmp edi, ecx
ja 0x40dff9
mov ax, word [edi]
cmp ax, word [ebp - 0x5018]
jne 0x40dff9
cmp edx, 1
je 0x40e10b
mov ax, word [edi + 2]
cmp ax, word [ebp - 0x5016]
je 0x40e10b
jmp 0x40dff9
mov ebx, dword [ebp - 0x5054]
jmp 0x40dfff
mov eax, dword [ebp - 0x5020]
nop dword [eax]
test eax, eax
je 0x40e0b9
mov ecx, dword [ebp - 0x5054]
cmp edi, ecx
jae 0x40e0f6
push edx
lea edx, [ebp - 0x501c]
push edx
push ecx
push eax
push edi
call fcn.0041a290
mov ebx, dword [ebp - 0x5054]
add esp, 0x14
test eax, eax
jne 0x40e10b
mov eax, dword [ebp - 0x5020]
mov edx, dword [ebp - 0x50b4]
jmp 0x40e0fc
mov edx, dword [ebp - 0x501c]
mov ecx, ebx
lea eax, [edx + edx]
sub ecx, eax
cmp edi, ecx
ja 0x40e0ab
mov ax, word [edi]
cmp ax, word [ebp - 0x5018]
jne 0x40e0ab
cmp edx, 1
je 0x40e10b
mov ax, word [edi + 2]
cmp ax, word [ebp - 0x5016]
je 0x40e10b
mov eax, dword [ebp - 0x5020]
mov edx, dword [ebp - 0x50b4]
jmp 0x40e0fc
mov ebx, dword [ebp - 0x5054]
add edi, 2
cmp edi, dword [ebp - 0x50b8]
jb 0x40e080
mov dword [ebp - 0x50b8], edi
jmp 0x40e119
mov edi, dword [ebp - 0x50b8]
cmp dword [ebp - 0x5108], 0
je 0x40e203
mov edx, dword [ebp - 0x50e0]
mov ecx, dword [ebp - 0x50d0]
test edx, edx
jne 0x40e13e
test ecx, ecx
je 0x40e464
cmp esi, edi
sbb eax, eax
neg eax
cmp esi, edi
jae 0x40e19b
movzx eax, word [esi]
test edx, edx
je 0x40e169
cmp ax, word [ebp - 0x50c0]
je 0x40e464
cmp ax, word [ebp - 0x50cc]
je 0x40e464
test ecx, ecx
je case.0x40e5e6.997
mov ecx, 0xff
cmp ax, cx
cmova eax, ecx
movzx edx, ax
mov eax, 1
mov ecx, edx
shr edx, 3
and ecx, 7
shl eax, cl
mov ecx, dword [ebp - 0x50d0]
test byte [edx + ecx], al
mov eax, 0
setne al
test eax, eax
jne 0x40e464
xor edi, edi
mov eax, dword [ebp - 0x50a0]
cmp eax, dword [ebp - 0x5098]
je 0x40e1c3
push dword [ebp - 0x50a8]
push eax
call dword [ebp - 0x50ac]
add esp, 8
mov ebx, dword [ebp - 0x50d4]
mov eax, dword [ebp - 0x50bc]
mov dword [ebx + 0xc], eax
mov eax, dword [ebp - 0x5044]
mov dword [ebx + 0x14], eax
mov byte [ebx + 0x24], 0
cmp edi, 1
jne 0x40e7ec
movzx eax, word [ebx + 0x26]
mov ecx, dword [ebp - 0x506c]
add eax, eax
cmp ecx, eax
jl 0x40e740
xor edx, edx
jmp 0x40e74a
cmp dword [ebp - 0x50e0], 0
je 0x40e26c
cmp esi, edi
jae 0x40e452
mov edx, dword [ebp - 0x50cc]
movzx eax, dx
cmp word [ebp - 0x50e8], ax
je 0x40e251
mov ecx, dword [ebp - 0x50c0]
nop dword [eax]
movzx eax, word [esi]
cmp ax, cx
je 0x40e452
cmp ax, dx
je 0x40e452
add esi, 2
cmp esi, edi
jb 0x40e230
jmp 0x40e452
mov eax, dword [ebp - 0x50c0]
cmp word [esi], ax
je 0x40e452
add esi, 2
cmp esi, edi
jb 0x40e257
jmp 0x40e452
test dword [ebp - 0x50f8], 0x200
je 0x40e40b
mov eax, dword [ebp - 0x5114]
mov edi, dword [ebp - 0x5058]
add eax, edi
cmp esi, eax
jbe 0x40e464
cmp esi, dword [ebp - 0x50b8]
jae 0x40e3dd
mov edx, dword [ebp - 0x50b4]
test edx, edx
je 0x40e359
mov ebx, dword [ebp - 0x50b8]
mov eax, dword [ebp - 0x5020]
test eax, eax
je 0x40e2e3
cmp esi, edi
jbe 0x40e329
push edx
lea ecx, [ebp - 0x501c]
push ecx
push edi
push eax
push esi
call fcn.0041a340
add esp, 0x14
test eax, eax
jne 0x40e3d7
mov edi, dword [ebp - 0x5058]
jmp 0x40e323
mov ebx, dword [ebp - 0x501c]
lea edx, [ebx + ebx]
lea eax, [edi + edx]
cmp esi, eax
jb 0x40e31d
mov ecx, esi
sub ecx, edx
mov ax, word [ecx]
cmp ax, word [ebp - 0x5018]
jne 0x40e31d
cmp ebx, 1
je 0x40e3d7
mov ax, word [ecx + 2]
cmp ax, word [ebp - 0x5016]
je 0x40e3d7
mov ebx, dword [ebp - 0x50b8]
mov edx, dword [ebp - 0x50b4]
add esi, 2
cmp esi, ebx
jae 0x40e3d7
mov ax, word [esi]
mov ecx, 0xfc00
and ax, cx
mov ecx, 0xdc00
cmp ax, cx
jne 0x40e34c
add esi, 2
cmp esi, ebx
jb 0x40e2b2
jmp 0x40e3d7
mov eax, dword [ebp - 0x5020]
mov ecx, dword [ebp - 0x50b8]
test eax, eax
je 0x40e38c
cmp esi, edi
jbe 0x40e3d0
push edx
lea ecx, [ebp - 0x501c]
push ecx
push edi
push eax
push esi
call fcn.0041a340
add esp, 0x14
test eax, eax
jne 0x40e3d7
mov edi, dword [ebp - 0x5058]
jmp 0x40e3be
mov ebx, dword [ebp - 0x501c]
lea edx, [ebx + ebx]
lea eax, [edi + edx]
cmp esi, eax
jb 0x40e3c4
mov ecx, esi
sub ecx, edx
mov ax, word [ecx]
cmp ax, word [ebp - 0x5018]
jne 0x40e3be
cmp ebx, 1
je 0x40e3d7
mov ax, word [ecx + 2]
cmp ax, word [ebp - 0x5016]
je 0x40e3d7
mov ecx, dword [ebp - 0x50b8]
mov edx, dword [ebp - 0x50b4]
mov eax, dword [ebp - 0x5020]
add esi, 2
cmp esi, ecx
jb 0x40e365
mov ebx, dword [ebp - 0x5054]
cmp word [esi - 2], 0xd
jne 0x40e464
mov eax, dword [ebp - 0x5020]
cmp eax, 1
je 0x40e3f8
cmp eax, 2
jne 0x40e464
cmp esi, dword [ebp - 0x50b8]
jae 0x40e464
cmp word [esi], 0xa
jne 0x40e464
add esi, 2
jmp 0x40e464
cmp dword [ebp - 0x50d0], 0
je 0x40e464
cmp esi, edi
jae 0x40e452
mov ebx, dword [ebp - 0x50d0]
nop
movzx edx, word [esi]
mov eax, 0xff
cmp edx, 0xff
cmova edx, eax
mov eax, 1
mov ecx, edx
shr edx, 3
and ecx, 7
shl eax, cl
test byte [edx + ebx], al
jne 0x40e44c
add esi, 2
cmp esi, edi
jb 0x40e420
mov ebx, dword [ebp - 0x5054]
cmp word [ebp - 0x5068], 0
jne 0x40e464
cmp esi, ebx
jae case.0x40e5e6.997
cmp word [ebp - 0x5068], 0
mov ecx, ebx
mov edx, dword [ebp - 0x50bc]
mov dword [ebp - 0x50b8], ecx
jne 0x40e52a
movzx eax, word [edx + 0x66]
sub ecx, esi
sar ecx, 1
cmp ecx, eax
jl case.0x40e5e6.997
cmp dword [ebp - 0x50fc], 0
je 0x40e52a
cmp ecx, 0x3e8
jge 0x40e52a
mov eax, dword [ebp - 0x50e0]
lea ecx, [esi + eax*2]
cmp ecx, dword [ebp - 0x50ec]
jbe 0x40e52a
cmp ecx, ebx
jae case.0x40e5e6.997
mov edx, dword [ebp - 0x50e4]
cmp dx, word [ebp - 0x50d8]
je 0x40e500
movzx eax, word [ecx]
mov edi, ecx
add ecx, 2
mov dword [ebp - 0x50ec], edi
mov edx, eax
cmp ax, word [ebp - 0x50e4]
je 0x40e51c
cmp dx, word [ebp - 0x50d8]
je 0x40e51c
cmp ecx, ebx
jb 0x40e4d1
jmp case.0x40e5e6.997
movzx eax, word [ecx]
mov edi, ecx
mov dword [ebp - 0x50ec], ecx
add ecx, 2
cmp ax, dx
je 0x40e51c
cmp ecx, ebx
jb 0x40e500
jmp case.0x40e5e6.997
cmp edi, ebx
jae case.0x40e5e6.997
mov edx, dword [ebp - 0x50bc]
cmp esi, dword [ebp - 0x5100]
ja case.0x40e5e6.997
mov ecx, dword [ebp - 0x50d4]
mov eax, esi
sub eax, dword [ebp - 0x50c4]
or dword [ebp - 0x5120], 1
sar eax, 1
mov dword [ebp - 0x513c], eax
lea eax, [ebp - 0x50b0]
push eax
push dword [ebp - 0x50dc]
movzx eax, word [edx + 0x68]
push eax
movzx eax, word [ecx + 0x26]
push eax
lea eax, [ecx + 0x2c]
mov dword [ebp - 0x504c], esi
push eax
push dword [ebp - 0x505c]
mov dword [ebp - 0x5048], esi
push esi
mov dword [ebp - 0x5088], 0
mov dword [ebp - 0x506c], 0
mov dword [ebp - 0x5028], 0
call fcn.004049f0
add esp, 0x1c
mov edi, eax
cmp dword [ebp - 0x5084], 0
je 0x40e5cd
cmp dword [ebp - 0x50f0], 0
jne 0x40e5cd
mov eax, dword [ebp - 0x504c]
mov dword [ebp - 0x50f0], eax
mov dword [ebp - 0x510c], esi
test edi, edi
jg case.default.0x40e5e6
je case.0x40e5e6.996
lea eax, [edi + 0x3e5]
cmp eax, 4
ja case.default.0x40e5e6
jmp dword [eax*4 + 0x40e8dc]
mov eax, dword [ebp - 0x5028]
mov ebx, esi
mov edx, dword [ebp - 0x50b4]
mov dword [ebp - 0x5024], eax
jmp 0x40e64c
mov ebx, dword [ebp - 0x5038]
cmp ebx, esi
jbe case.0x40e5e6.996
mov edx, dword [ebp - 0x50b4]
jmp 0x40e64c
mov edx, dword [ebp - 0x50b4]
lea ebx, [esi + 2]
mov dword [ebp - 0x5024], 0
test edx, edx
je 0x40e64c
cmp ebx, dword [ebp - 0x50b8]
jae 0x40e64c
mov ax, word [ebx]
mov ecx, 0xfc00
and ax, cx
mov ecx, 0xdc00
cmp ax, cx
jne 0x40e64c
add ebx, 2
mov eax, dword [ebp - 0x5020]
xor edi, edi
cmp dword [ebp - 0x5104], edi
je 0x40e68f
test eax, eax
je 0x40e6fa
mov ecx, dword [ebp - 0x5054]
cmp esi, ecx
jae 0x40e68f
push edx
lea edx, [ebp - 0x501c]
push edx
push ecx
push eax
push esi
call fcn.0041a290
add esp, 0x14
test eax, eax
jne case.default.0x40e5e6
mov eax, dword [ebp - 0x5020]
mov edx, dword [ebp - 0x501c]
mov esi, ebx
cmp dword [ebp - 0x5108], edi
jne case.default.0x40e5e6
mov ecx, dword [ebp - 0x50b8]
cmp ebx, ecx
ja case.default.0x40e5e6
cmp ebx, dword [ebp - 0x5118]
jbe 0x40e6eb
cmp word [ebx - 2], 0xd
jne 0x40e6eb
cmp ebx, ecx
jae 0x40e6eb
cmp word [ebx], 0xa
jne 0x40e6eb
mov edi, dword [ebp - 0x50bc]
test dword [edi + 0x48], 0x800
jne 0x40e6eb
cmp eax, 1
je 0x40e6e8
cmp eax, 2
je 0x40e6e8
cmp edx, 2
jne 0x40e6eb
lea esi, [ebx + 2]
mov dword [ebp - 0x5044], 0
jmp 0x40df80
mov edx, dword [ebp - 0x501c]
mov eax, dword [ebp - 0x5054]
lea ecx, [edx + edx]
sub eax, ecx
cmp esi, eax
ja 0x40e735
mov ax, word [esi]
cmp ax, word [ebp - 0x5018]
jne 0x40e735
cmp edx, 1
je case.default.0x40e5e6
mov ax, word [esi + 2]
cmp ax, word [ebp - 0x5016]
je case.default.0x40e5e6
mov eax, dword [ebp - 0x5020]
jmp 0x40e695
mov eax, ecx
cdq
sub eax, edx
mov edx, eax
sar edx, 1
inc edx
mov edi, dword [ebp - 0x50c4]
sub esi, edi
mov eax, dword [ebp - 0x504c]
mov ecx, dword [ebp - 0x5050]
sub eax, edi
sar esi, 1
sar eax, 1
cmp dword [ebp - 0x5048], ecx
mov dword [ebx + 0x28], edx
cmova ecx, dword [ebp - 0x5048]
sub ecx, edi
mov dword [ebx + 0x20], esi
sar ecx, 1
test dword [ebp + 0x18], 0x4000
mov dword [ebx + 0x18], eax
mov dword [ebx + 0x1c], ecx
je 0x40e7d6
mov eax, dword [ebp - 0x50c8]
mov esi, dword [ebp - 0x511c]
push dword [ebx + 8]
lea esi, [esi + eax]
mov eax, dword [ebx]
add esi, esi
push esi
call eax
add esp, 8
mov dword [ebx + 0x10], eax
test eax, eax
je 0x40e86c
push esi
push edi
push eax
call fcn.0041fb10
mov edx, dword [ebx + 0x28]
add esp, 0xc
or byte [ebx + 0x25], 1
mov eax, edx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041e1b5
mov esp, ebp
pop ebp
ret
mov dword [ebx + 0x10], edi
mov eax, edx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041e1b5
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x5040]
mov dword [ebx + 0x14], eax
test edi, edi
je 0x40e7fe
cmp edi, 0xfffffffe
jne 0x40e856
mov edx, dword [ebp - 0x510c]
test edx, edx
je 0x40e853
mov ecx, dword [ebp - 0x50c4]
mov edi, 0xfffffffe
mov eax, dword [ebp - 0x50b8]
sub edx, ecx
sar edx, 1
sub eax, ecx
mov dword [ebx + 0x2c], edx
mov dword [ebx + 0x20], edx
mov edx, dword [ebp - 0x50f0]
sar eax, 1
sub edx, ecx
mov dword [ebx + 0x30], eax
sar edx, 1
mov dword [ebx + 0x1c], eax
mov eax, edi
mov dword [ebx + 0x10], ecx
mov dword [ebx + 0x18], edx
mov dword [ebx + 0x28], edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041e1b5
mov esp, ebp
pop ebp
ret
or edi, 0xffffffff
mov dword [ebx + 0x28], edi
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041e1b5
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 0xffffffd0
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041e1b5
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 0xffffffd4
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041e1b5
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 0xffffffcd
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041e1b5
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov eax, 0xffffffde
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041e1b5
mov esp, ebp
pop ebp
ret