Function at 0x406362
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0xb8
push esi
push edi
mov eax, ecx
lea edi, [esp + 0x1c]
push 0x22
pop ecx
mov esi, eax
mov dword [esp + 0xb8], eax
rep movsd dword es:[edi], dword [esi]
cmp dword [esp + 0x74], 0xffffffff
jne 0x40638d
xor eax, eax
inc eax
jmp 0x4070d5
mov eax, dword [esp + 0x8c]
mov edx, dword [esp + 0x78]
mov ecx, dword [esp + 0x5c]
mov edi, dword [esp + 0x98]
mov esi, dword [esp + 0x64]
mov dword [esp + 0xac], eax
mov eax, dword [esp + 0x88]
mov dword [esp + 0xb0], eax
mov eax, dword [esp + 0x58]
mov dword [esp + 0xa8], eax
mov al, byte [esp + 0x49]
push ebx
mov ebx, dword [esp + 0x98]
push ebp
mov ebp, dword [esp + 0x68]
mov byte [esp + 0x23], al
mov eax, dword [esp + 0x24]
mov dword [esp + 0xc4], 9
mov dword [esp + 0xbc], 8
mov dword [esp + 0x1c], edx
mov dword [esp + 0x10], ecx
cmp eax, 0x1c
ja case.default.0x406407
jmp dword [eax*4 + 0x4070de]
mov eax, dword [esp + 0x40]
test eax, eax
je 0x4070bc
dec eax
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x3c]
mov cl, byte [eax]
inc eax
mov dword [esp + 0x3c], eax
cmp cl, 0xe1
ja case.default.0x406407
movzx eax, cl
cdq
push 0x2d
pop ecx
idiv ecx
push 9
mov esi, eax
movzx eax, dl
cdq
pop ecx
idiv ecx
movzx ecx, dl
xor edx, edx
inc edx
mov dword [esp + 0x70], ecx
mov ecx, esi
shl edx, cl
mov ecx, eax
dec edx
mov dword [esp + 0xb8], edx
mov dword [esp + 0x90], edx
xor edx, edx
inc edx
shl edx, cl
mov ecx, dword [esp + 0x70]
dec edx
mov dword [esp + 0xb4], edx
mov dword [esp + 0x94], edx
lea ecx, [ecx + esi]
mov esi, 0x300
shl esi, cl
mov ecx, dword [esp + 0xa8]
add esi, 0x736
lea eax, [esi + esi]
cmp eax, dword [esp + 0x34]
je 0x4064cd
test ecx, ecx
je 0x4064ac
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
lea eax, [esi + esi]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ecx, eax
mov dword [esp + 0xa8], ecx
test ecx, ecx
je case.default.0x406407
lea eax, [esi + esi]
mov dword [esp + 0x34], eax
test esi, esi
je 0x4064dd
dec esi
mov eax, 0x400
mov word [ecx + esi*2], ax
jne 0x4064d1
xor ecx, ecx
xor esi, esi
jmp 0x40650c
mov eax, dword [esp + 0x40]
test eax, eax
je 0x40703f
mov edx, dword [esp + 0x3c]
dec eax
shl ecx, 3
mov dword [esp + 0x40], eax
movzx eax, byte [edx]
shl eax, cl
mov ecx, dword [esp + 0x10]
or esi, eax
inc edx
inc ecx
mov dword [esp + 0x3c], edx
mov dword [esp + 0x64], ecx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x6c], esi
cmp ecx, 4
jl case.0x406407.1
mov eax, dword [esp + 0x38]
cmp esi, eax
je 0x406557
mov eax, dword [esp + 0xa4]
mov dword [esp + 0x38], esi
test eax, eax
je 0x40653b
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [esp + 0xa4], eax
test eax, eax
je case.default.0x406407
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0xa4]
push 5
mov byte [ecx + eax - 1], 0
pop ecx
jmp 0x406591
mov eax, dword [esp + 0x40]
test eax, eax
je 0x407049
mov edx, dword [esp + 0x3c]
dec eax
mov dword [esp + 0x40], eax
shl edi, 8
movzx eax, byte [edx]
or edi, eax
inc edx
mov dword [esp + 0xa0], edi
mov dword [esp + 0x3c], edx
mov eax, ecx
dec ecx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x64], ecx
test eax, eax
jne case.0x406407.3
mov ecx, dword [esp + 0x4c]
and ecx, dword [esp + 0xb8]
mov eax, dword [esp + 0x74]
shl eax, 4
mov dword [esp + 0xb0], ecx
add eax, ecx
mov dword [esp + 0x60], ecx
mov ecx, dword [esp + 0xa8]
mov dword [esp + 0x28], 6
lea ecx, [ecx + eax*2]
mov dword [esp + 0x58], ecx
jmp 0x406e76
test esi, esi
jne 0x406671
movzx edx, byte [esp + 0x50]
push 8
pop eax
mov cl, al
mov eax, dword [esp + 0x4c]
sub cl, byte [esp + 0x70]
and eax, dword [esp + 0xb4]
shr edx, cl
mov ecx, dword [esp + 0x70]
shl eax, cl
mov ecx, dword [esp + 0xa8]
add edx, eax
imul eax, edx, 0x600
add ecx, 0xe6c
add eax, ecx
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x74]
cmp eax, 4
jge 0x40662d
and dword [esp + 0x74], esi
jmp 0x40663e
cmp eax, 0xa
jge 0x406637
sub eax, 3
jmp 0x40663a
sub eax, 6
mov dword [esp + 0x74], eax
cmp dword [esp + 0x78], 0
je 0x406669
mov eax, dword [esp + 0x98]
sub eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x38]
cmp eax, ecx
jb 0x40665a
add eax, ecx
mov ecx, dword [esp + 0xa4]
xor ebp, ebp
inc ebp
mov al, byte [eax + ecx]
jmp 0x4066e8
xor ebp, ebp
inc ebp
jmp 0x4068a6
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0xa8]
mov dword [esp + 0x78], 1
push 7
lea ecx, [ecx + eax*2]
add ecx, 0x180
pop eax
mov dword [esp + 0x58], ecx
mov dword [esp + 0x28], eax
jmp 0x406e76
mov edx, dword [esp + 0x40]
test edx, edx
je 0x407053
shl ebx, 8
dec edx
mov dword [esp + 0x40], edx
mov edx, dword [esp + 0x3c]
shl edi, 8
mov dword [esp + 0x9c], ebx
movzx eax, byte [edx]
or edi, eax
inc edx
mov dword [esp + 0xa0], edi
mov dword [esp + 0x3c], edx
cmp ecx, esi
jne 0x4067c0
cmp ebp, 0x100
jge 0x406859
mov al, byte [esp + 0x23]
mov edx, dword [esp + 0x54]
movzx ecx, al
add al, al
shr ecx, 7
mov byte [esp + 0x23], al
mov byte [esp + 0x51], al
mov dword [esp + 0x10], ecx
lea eax, [ecx + 1]
mov dword [esp + 0x64], ecx
shl eax, 8
add eax, ebp
lea edx, [edx + eax*2]
movzx eax, word [edx]
movzx esi, ax
mov dword [esp + 0x14], eax
mov eax, ebx
shr eax, 0xb
imul eax, esi
mov dword [esp + 0x18], esi
xor esi, esi
mov dword [esp + 0x58], edx
cmp edi, eax
jae 0x406745
mov ebx, eax
mov eax, 0x800
sub eax, dword [esp + 0x18]
sar eax, 5
add eax, dword [esp + 0x14]
add ebp, ebp
jmp 0x40676a
sub edi, eax
lea ebp, [ebp*2 + 1]
sub ebx, eax
mov dword [esp + 0xa0], edi
mov ax, word [esp + 0x14]
inc esi
shr ax, 5
sub word [esp + 0x14], ax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x68], ebp
mov word [edx], ax
mov dword [esp + 0x9c], ebx
mov dword [esp + 0x6c], esi
cmp ebx, 0x1000000
jae 0x4066d0
jmp case.0x406407.13
mov edx, dword [esp + 0x40]
test edx, edx
je 0x40705d
shl ebx, 8
dec edx
mov dword [esp + 0x40], edx
mov edx, dword [esp + 0x3c]
shl edi, 8
mov dword [esp + 0x9c], ebx
movzx eax, byte [edx]
or edi, eax
inc edx
mov dword [esp + 0xa0], edi
mov dword [esp + 0x3c], edx
cmp ebp, 0x100
jge 0x406859
mov edx, dword [esp + 0x54]
lea eax, [ebp*2]
add edx, eax
mov dword [esp + 0xac], eax
mov dword [esp + 0x58], edx
movzx eax, word [edx]
mov dword [esp + 0x18], eax
movzx eax, ax
mov dword [esp + 0x14], eax
mov eax, ebx
shr eax, 0xb
imul eax, dword [esp + 0x14]
cmp edi, eax
jae 0x406819
mov ebx, eax
mov eax, 0x800
sub eax, dword [esp + 0x14]
sar eax, 5
add eax, dword [esp + 0x18]
add ebp, ebp
mov word [edx], ax
jmp 0x40683d
mov ebp, dword [esp + 0x18]
sub edi, eax
sub ebx, eax
mov dword [esp + 0xa0], edi
mov ax, bp
shr ax, 5
sub bp, ax
mov word [edx], bp
mov ebp, dword [esp + 0xac]
inc ebp
mov dword [esp + 0x68], ebp
mov dword [esp + 0x9c], ebx
cmp ebx, 0x1000000
jae 0x4067c0
jmp case.0x406407.14
mov al, byte [esp + 0x68]
and dword [esp + 0x78], 0
mov byte [esp + 0x50], al
jmp 0x40692c
mov eax, dword [esp + 0x40]
test eax, eax
je 0x407067
mov ecx, dword [esp + 0x3c]
shl ebx, 8
dec eax
mov dword [esp + 0x40], eax
shl edi, 8
movzx eax, byte [ecx]
or edi, eax
mov dword [esp + 0x9c], ebx
inc ecx
mov dword [esp + 0xa0], edi
mov dword [esp + 0x3c], ecx
cmp ebp, 0x100
jge 0x40691e
mov edx, dword [esp + 0x54]
lea eax, [ebp*2]
add edx, eax
mov dword [esp + 0xac], eax
mov eax, ebx
mov dword [esp + 0x58], edx
shr eax, 0xb
movzx ecx, word [edx]
imul eax, ecx
mov dword [esp + 0x18], ecx
cmp edi, eax
jae 0x4068e6
mov ebx, eax
mov eax, 0x800
sub eax, ecx
sar eax, 5
add eax, ecx
add ebp, ebp
mov word [edx], ax
jmp 0x406906
mov ebp, dword [esp + 0xac]
sub edi, eax
sub ebx, eax
mov dword [esp + 0xa0], edi
mov ax, cx
shr ax, 5
sub cx, ax
inc ebp
mov word [edx], cx
mov dword [esp + 0x68], ebp
mov dword [esp + 0x9c], ebx
cmp ebx, 0x1000000
jae 0x40689e
jmp case.0x406407.15
mov al, byte [esp + 0x68]
mov byte [esp + 0x50], al
jmp 0x40692c
mov al, byte [esp + 0x50]
mov edx, dword [esp + 0x48]
test edx, edx
je 0x407071
mov ecx, dword [esp + 0x44]
inc dword [esp + 0x4c]
mov byte [ecx], al
inc ecx
dec edx
mov dword [esp + 0x44], ecx
mov ecx, dword [esp + 0x98]
mov dword [esp + 0x48], edx
mov edx, dword [esp + 0xa4]
mov byte [ecx + edx], al
mov eax, ecx
inc eax
mov ecx, dword [esp + 0x10]
xor edx, edx
div dword [esp + 0x38]
mov dword [esp + 0x98], edx
jmp 0x406e1a
cmp esi, 1
jne 0x406996
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0xa8]
push 8
lea ecx, [ecx + eax*2]
add ecx, 0x198
jmp 0x40668f
mov eax, dword [esp + 0x88]
mov ecx, dword [esp + 0x84]
mov dword [esp + 0x8c], eax
push 0xa
pop eax
push 7
mov dword [esp + 0x8c], ecx
pop ecx
cmp dword [esp + 0x74], ecx
mov dword [esp + 0x84], edx
cmovl eax, ecx
mov dword [esp + 0x2c], 0x16
mov dword [esp + 0x74], eax
mov eax, dword [esp + 0xa8]
add eax, 0x664
mov dword [esp + 0x54], eax
jmp 0x406e26
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0xa8]
test esi, esi
jne 0x406a0d
add eax, 0xf
shl eax, 4
add eax, dword [esp + 0xb0]
push 9
lea ecx, [ecx + eax*2]
jmp 0x40668f
lea ecx, [ecx + eax*2]
mov dword [esp + 0x28], 0xa
add ecx, 0x1b0
mov dword [esp + 0x58], ecx
jmp 0x406e76
test esi, esi
jne 0x406b34
cmp dword [esp + 0x4c], esi
je case.default.0x406407
cmp dword [esp + 0x74], 7
push 0xb
pop eax
cmovl eax, dword [esp + 0xc4]
mov dword [esp + 0x74], eax
cmp dword [esp + 0x48], 0
je 0x40707b
mov eax, dword [esp + 0x98]
sub eax, edx
mov edx, dword [esp + 0x38]
cmp eax, edx
jb 0x406a6b
add eax, edx
mov edx, dword [esp + 0xa4]
mov ecx, dword [esp + 0x98]
push 2
mov al, byte [eax + edx]
mov byte [ecx + edx], al
xor edx, edx
mov byte [esp + 0x54], al
mov eax, ecx
inc eax
mov ecx, dword [esp + 0x48]
div dword [esp + 0x3c]
mov al, byte [esp + 0x54]
inc dword [esp + 0x50]
mov byte [ecx], al
inc ecx
dec dword [esp + 0x4c]
mov dword [esp + 0x9c], edx
mov dword [esp + 0x48], ecx
pop eax
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x24], eax
jmp 0x4063fe
test esi, esi
jne 0x406acb
mov eax, dword [esp + 0x84]
jmp 0x406b20
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0xa8]
mov dword [esp + 0x28], 0xb
lea ecx, [ecx + eax*2]
add ecx, 0x1c8
mov dword [esp + 0x58], ecx
jmp 0x406e76
test esi, esi
jne 0x406afd
mov eax, dword [esp + 0x88]
jmp 0x406b12
mov eax, dword [esp + 0x8c]
mov ecx, dword [esp + 0x88]
mov dword [esp + 0x8c], ecx
mov ecx, dword [esp + 0x84]
mov dword [esp + 0x88], ecx
mov ecx, eax
mov dword [esp + 0x84], edx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x80], ecx
mov eax, dword [esp + 0xa8]
add eax, 0xa68
mov dword [esp + 0x2c], 0x15
mov dword [esp + 0x54], eax
jmp 0x406e26
cmp dword [esp + 0x74], 7
push 0xb
pop eax
cmovl eax, dword [esp + 0xbc]
mov dword [esp + 0x74], eax
jmp 0x406d8b
cmp dword [esp + 0x7c], 4
mov ecx, dword [esp + 0xa8]
push 3
pop eax
cmovl eax, dword [esp + 0x7c]
add ecx, 0x360
shl eax, 7
add eax, ecx
mov dword [esp + 0x30], 0x19
push 6
mov dword [esp + 0x58], eax
pop esi
jmp 0x406f49
cmp ebp, 4
jl 0x406be1
mov esi, ebp
mov eax, ebp
sar esi, 1
and eax, 1
dec esi
or eax, 2
mov ecx, esi
shl eax, cl
mov dword [esp + 0x1c], eax
mov dword [esp + 0x80], eax
cmp ebp, 0xe
jge 0x406bda
mov ecx, dword [esp + 0xa8]
sub eax, ebp
add ecx, 0x55e
lea eax, [ecx + eax*2]
jmp 0x406c74
xor ebp, ebp
lea ecx, [esi - 4]
jmp 0x406c1c
mov edx, ebp
jmp 0x406d7f
mov eax, dword [esp + 0x40]
test eax, eax
je 0x407085
mov edx, dword [esp + 0x3c]
shl ebx, 8
dec eax
mov dword [esp + 0x40], eax
shl edi, 8
movzx eax, byte [edx]
or edi, eax
mov dword [esp + 0x9c], ebx
inc edx
mov dword [esp + 0xa0], edi
mov dword [esp + 0x3c], edx
dec ecx
mov dword [esp + 0x64], ecx
test ecx, ecx
jle 0x406c51
shr ebx, 1
add ebp, ebp
mov dword [esp + 0x9c], ebx
mov dword [esp + 0x68], ebp
cmp edi, ebx
jb 0x406c47
sub edi, ebx
or ebp, 1
mov dword [esp + 0xa0], edi
mov dword [esp + 0x68], ebp
cmp ebx, 0x1000000
jae 0x406c1b
jmp case.0x406407.12
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0xa8]
shl ebp, 4
add ecx, ebp
add eax, 0x644
push 4
mov dword [esp + 0x20], ecx
mov dword [esp + 0x84], ecx
pop esi
mov dword [esp + 0x54], eax
xor ebp, ebp
xor eax, eax
mov dword [esp + 0x6c], esi
inc eax
mov dword [esp + 0x68], ebp
mov dword [esp + 0x5c], eax
xor ecx, ecx
jmp 0x406cc5
mov eax, dword [esp + 0x40]
test eax, eax
je 0x407096
mov edx, dword [esp + 0x3c]
shl ebx, 8
dec eax
mov dword [esp + 0x40], eax
shl edi, 8
movzx eax, byte [edx]
or edi, eax
mov dword [esp + 0x9c], ebx
inc edx
mov dword [esp + 0xa0], edi
mov dword [esp + 0x3c], edx
mov eax, dword [esp + 0x5c]
inc ecx
mov dword [esp + 0x64], ecx
mov dword [esp + 0x10], ecx
cmp ecx, esi
jge 0x406d79
mov edx, dword [esp + 0x54]
add eax, eax
add edx, eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x58], edx
movzx eax, word [edx]
mov dword [esp + 0x14], eax
movzx eax, ax
mov dword [esp + 0x18], eax
mov eax, ebx
shr eax, 0xb
imul eax, dword [esp + 0x18]
mov dword [esp + 0xac], eax
cmp edi, eax
jae 0x406d23
mov ebx, eax
mov eax, 0x800
sub eax, dword [esp + 0x18]
sar eax, 5
add eax, dword [esp + 0x14]
shl dword [esp + 0x5c], 1
mov word [edx], ax
jmp 0x406d61
sub edi, dword [esp + 0xac]
xor eax, eax
sub ebx, dword [esp + 0xac]
inc eax
shl eax, cl
or ebp, eax
mov dword [esp + 0xa0], edi
mov ax, word [esp + 0x14]
shr ax, 5
sub word [esp + 0x14], ax
mov eax, dword [esp + 0x14]
mov word [edx], ax
mov eax, dword [esp + 0x10]
inc eax
mov dword [esp + 0x68], ebp
mov dword [esp + 0x5c], eax
mov dword [esp + 0x9c], ebx
cmp ebx, 0x1000000
jae 0x406cc0
jmp case.0x406407.16
mov edx, dword [esp + 0x1c]
add edx, ebp
inc edx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x80], edx
test edx, edx
je 0x40708f
cmp edx, dword [esp + 0x4c]
ja case.default.0x406407
mov eax, dword [esp + 0x7c]
add eax, 2
add dword [esp + 0x4c], eax
mov dword [esp + 0x7c], eax
cmp dword [esp + 0x48], 0
je 0x4070a0
mov eax, dword [esp + 0x98]
sub eax, edx
mov edx, dword [esp + 0x38]
cmp eax, edx
jb 0x406dca
add eax, edx
mov edx, dword [esp + 0xa4]
mov ecx, dword [esp + 0x98]
mov al, byte [eax + edx]
mov byte [ecx + edx], al
xor edx, edx
mov byte [esp + 0x50], al
mov eax, ecx
inc eax
mov ecx, dword [esp + 0x44]
div dword [esp + 0x38]
mov al, byte [esp + 0x50]
mov byte [ecx], al
inc ecx
mov eax, dword [esp + 0x7c]
dec dword [esp + 0x48]
dec eax
mov dword [esp + 0x98], edx
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x44], ecx
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x7c], eax
test eax, eax
jg case.0x406407.28
push 2
pop eax
jmp 0x406ab1
mov eax, dword [esp + 0x54]
mov ecx, eax
mov dword [esp + 0x28], 0x12
mov dword [esp + 0x58], ecx
jmp 0x406e76
test esi, esi
jne 0x406e5d
mov eax, dword [esp + 0xb0]
mov edx, dword [esp + 0x54]
and dword [esp + 0x7c], esi
shl eax, 4
add edx, 4
add edx, eax
push 3
mov dword [esp + 0x58], edx
pop esi
jmp 0x406f41
mov ecx, dword [esp + 0x54]
add ecx, 2
mov dword [esp + 0x28], 0x13
mov dword [esp + 0x58], ecx
jmp 0x406e76
mov ecx, dword [esp + 0x58]
movzx edx, word [ecx]
mov eax, ebx
shr eax, 0xb
mov esi, edx
imul eax, esi
cmp edi, eax
jae 0x406e9c
mov ebx, eax
mov eax, 0x800
sub eax, esi
sar eax, 5
add eax, edx
xor esi, esi
mov word [ecx], ax
jmp 0x406eb7
sub edi, eax
sub ebx, eax
mov ax, dx
mov dword [esp + 0xa0], edi
shr ax, 5
xor esi, esi
sub dx, ax
inc esi
mov word [ecx], dx
mov dword [esp + 0x6c], esi
mov dword [esp + 0x9c], ebx
cmp ebx, 0x1000000
jae 0x406efd
mov eax, dword [esp + 0x40]
test eax, eax
je 0x4070aa
mov ecx, dword [esp + 0x3c]
shl ebx, 8
dec eax
mov dword [esp + 0x40], eax
shl edi, 8
movzx eax, byte [ecx]
or edi, eax
mov dword [esp + 0x9c], ebx
inc ecx
mov dword [esp + 0xa0], edi
mov dword [esp + 0x3c], ecx
mov eax, dword [esp + 0x28]
jmp 0x406aad
test esi, esi
jne 0x406f2a
mov edx, dword [esp + 0x54]
push 8
pop eax
mov dword [esp + 0x7c], eax
mov eax, dword [esp + 0xb0]
shl eax, 4
add edx, 0x104
jmp 0x406e4f
add dword [esp + 0x54], 0x204
push 0x10
pop eax
push 8
mov dword [esp + 0x80], eax
pop eax
mov esi, eax
mov dword [esp + 0x30], 0x14
mov dword [esp + 0x6c], esi
xor edx, edx
mov ecx, esi
inc edx
mov dword [esp + 0x5c], edx
jmp 0x406f90
mov eax, dword [esp + 0x40]
test eax, eax
je 0x4070b4
mov edx, dword [esp + 0x3c]
shl ebx, 8
dec eax
mov dword [esp + 0x40], eax
shl edi, 8
movzx eax, byte [edx]
or edi, eax
mov dword [esp + 0x9c], ebx
inc edx
mov dword [esp + 0xa0], edi
mov dword [esp + 0x3c], edx
mov edx, dword [esp + 0x5c]
dec ecx
mov dword [esp + 0x64], ecx
mov dword [esp + 0x10], ecx
test ecx, ecx
jle 0x407016
lea eax, [edx + edx]
mov edx, dword [esp + 0x54]
add edx, eax
mov dword [esp + 0xac], eax
mov eax, ebx
mov dword [esp + 0x58], edx
shr eax, 0xb
movzx ebp, word [edx]
imul eax, ebp
mov dword [esp + 0x18], ebp
cmp edi, eax
jae 0x406fda
mov ebx, eax
mov eax, 0x800
sub eax, ebp
sar eax, 5
add eax, ebp
shl dword [esp + 0x5c], 1
mov word [edx], ax
jmp 0x406ffe
sub edi, eax
sub ebx, eax
mov ax, bp
mov dword [esp + 0xa0], edi
shr ax, 5
sub bp, ax
mov eax, dword [esp + 0xac]
inc eax
mov word [edx], bp
mov dword [esp + 0x5c], eax
mov dword [esp + 0x9c], ebx
cmp ebx, 0x1000000
jae 0x406f8b
jmp case.0x406407.24
xor eax, eax
mov ecx, esi
inc eax
mov ebp, edx
shl eax, cl
sub ebp, eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x68], ebp
jmp 0x406aad
mov eax, dword [esp + 0x2c]
add dword [esp + 0x7c], ebp
mov dword [esp + 0x24], eax
jmp 0x4063fe
mov dword [esp + 0x24], 1
jmp 0x4070bc
mov dword [esp + 0x24], 3
jmp 0x4070bc
mov dword [esp + 0x24], 0xd
jmp 0x4070bc
mov dword [esp + 0x24], 0xe
jmp 0x4070bc
mov dword [esp + 0x24], 0xf
jmp 0x4070bc
mov dword [esp + 0x24], 0x1a
jmp 0x4070bc
mov dword [esp + 0x24], 0x1b
jmp 0x4070bc
mov dword [esp + 0x24], 0xc
jmp 0x4070bc
or dword [esp + 0x7c], 0xffffffff
jmp 0x4070bc
mov dword [esp + 0x24], 0x10
jmp 0x4070bc
mov dword [esp + 0x24], 0x1c
jmp 0x4070bc
mov dword [esp + 0x24], 5
jmp 0x4070bc
mov dword [esp + 0x24], 0x18
mov edi, dword [esp + 0xc0]
lea esi, [esp + 0x24]
push 0x22
pop ecx
rep movsd dword es:[edi], dword [esi]
xor eax, eax
jmp 0x4070d3
or eax, 0xffffffff
pop ebp
pop ebx
pop edi
pop esi
add esp, 0xb8
ret