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

Disassembly:
sub esp, 0xb8
push esi
push edi
mov eax, ecx
push 0x22
pop ecx
mov esi, eax
lea edi, [esp + 0x1c]
rep movsd dword es:[edi], dword [esi]
cmp dword [esp + 0x74], 0xffffffff
mov dword [esp + 0xb8], eax
jne 0x407c55
xor eax, eax
inc eax
jmp 0x40899c
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.0x407ccf
jmp dword [eax*4 + 0x4089a6]
mov eax, dword [esp + 0x40]
test eax, eax
je 0x408983
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.0x407ccf
movzx eax, cl
cdq
push 0x2d
pop ecx
idiv ecx
push 9
pop ecx
mov esi, eax
movzx eax, dl
cdq
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]
lea ecx, [ecx + esi]
mov esi, 0x300
shl esi, cl
mov ecx, dword [esp + 0xa8]
dec edx
mov dword [esp + 0xb4], edx
add esi, 0x736
mov dword [esp + 0x94], edx
lea eax, [esi + esi]
cmp eax, dword [esp + 0x34]
je 0x407d95
test ecx, ecx
je 0x407d74
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.0x407ccf
lea eax, [esi + esi]
mov dword [esp + 0x34], eax
test esi, esi
je 0x407da5
dec esi
mov eax, 0x400
mov word [ecx + esi*2], ax
jne 0x407d99
xor ecx, ecx
xor esi, esi
jmp 0x407dd4
mov eax, dword [esp + 0x40]
test eax, eax
je 0x408906
mov edx, dword [esp + 0x3c]
dec eax
mov dword [esp + 0x40], eax
movzx eax, byte [edx]
shl ecx, 3
shl eax, cl
mov ecx, dword [esp + 0x10]
or esi, eax
inc edx
mov dword [esp + 0x3c], edx
inc ecx
mov dword [esp + 0x64], ecx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x6c], esi
cmp ecx, 4
jl case.0x407ccf.1
mov eax, dword [esp + 0x38]
cmp esi, eax
je 0x407e1f
mov eax, dword [esp + 0xa4]
mov dword [esp + 0x38], esi
test eax, eax
je 0x407e03
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.0x407ccf
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0xa4]
push 5
mov byte [ecx + eax - 1], 0
pop ecx
jmp 0x407e59
mov eax, dword [esp + 0x40]
test eax, eax
je 0x408910
mov edx, dword [esp + 0x3c]
dec eax
mov dword [esp + 0x40], eax
movzx eax, byte [edx]
shl edi, 8
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.0x407ccf.3
mov ecx, dword [esp + 0x4c]
and ecx, dword [esp + 0xb8]
mov eax, dword [esp + 0x74]
shl eax, 4
mov dword [esp + 0xb0], ecx
mov dword [esp + 0x60], ecx
add eax, ecx
mov ecx, dword [esp + 0xa8]
mov dword [esp + 0x28], 6
lea ecx, [ecx + eax*2]
mov dword [esp + 0x58], ecx
jmp 0x40873d
test esi, esi
jne 0x407f38
movzx edx, byte [esp + 0x50]
push 8
pop eax
mov cl, al
sub cl, byte [esp + 0x70]
mov eax, dword [esp + 0x4c]
and eax, dword [esp + 0xb4]
shr edx, cl
mov ecx, dword [esp + 0x70]
shl eax, cl
add edx, eax
mov eax, dword [esp + 0xa8]
imul edx, edx, 0x600
add eax, 0xe6c
add eax, edx
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x74]
cmp eax, 4
jge 0x407ef4
and dword [esp + 0x74], esi
jmp 0x407f05
cmp eax, 0xa
jge 0x407efe
sub eax, 3
jmp 0x407f01
sub eax, 6
mov dword [esp + 0x74], eax
cmp dword [esp + 0x78], 0
je 0x407f30
mov eax, dword [esp + 0x98]
sub eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x38]
cmp eax, ecx
jb 0x407f21
add eax, ecx
mov ecx, dword [esp + 0xa4]
xor ebp, ebp
mov al, byte [eax + ecx]
inc ebp
jmp 0x407faf
xor ebp, ebp
inc ebp
jmp 0x40816d
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0xa8]
mov dword [esp + 0x78], 1
lea ecx, [ecx + eax*2]
add ecx, 0x180
push 7
pop eax
mov dword [esp + 0x58], ecx
mov dword [esp + 0x28], eax
jmp 0x40873d
mov edx, dword [esp + 0x40]
test edx, edx
je 0x40891a
shl ebx, 8
dec edx
mov dword [esp + 0x40], edx
mov edx, dword [esp + 0x3c]
shl edi, 8
movzx eax, byte [edx]
or edi, eax
inc edx
mov dword [esp + 0x9c], ebx
mov dword [esp + 0xa0], edi
mov dword [esp + 0x3c], edx
cmp ecx, esi
jne 0x408087
cmp ebp, 0x100
jge 0x408120
mov al, byte [esp + 0x23]
mov edx, dword [esp + 0x54]
movzx ecx, al
add al, al
mov byte [esp + 0x23], al
mov byte [esp + 0x51], al
shr ecx, 7
mov dword [esp + 0x10], ecx
lea eax, [ecx + 1]
shl eax, 8
add eax, ebp
mov dword [esp + 0x64], ecx
lea edx, [edx + eax*2]
mov dword [esp + 0x58], edx
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
cmp edi, eax
jae 0x40800c
mov ebx, eax
mov eax, 0x800
sub eax, dword [esp + 0x18]
sar eax, 5
add eax, dword [esp + 0x14]
add ebp, ebp
jmp 0x408031
sub edi, eax
sub ebx, eax
mov ax, word [esp + 0x14]
shr ax, 5
inc esi
sub word [esp + 0x14], ax
mov eax, dword [esp + 0x14]
mov dword [esp + 0xa0], edi
lea ebp, [ebp*2 + 1]
mov dword [esp + 0x68], ebp
mov word [edx], ax
mov dword [esp + 0x9c], ebx
mov dword [esp + 0x6c], esi
cmp ebx, 0x1000000
jae 0x407f97
jmp case.0x407ccf.13
mov edx, dword [esp + 0x40]
test edx, edx
je 0x408924
shl ebx, 8
dec edx
mov dword [esp + 0x40], edx
mov edx, dword [esp + 0x3c]
shl edi, 8
movzx eax, byte [edx]
or edi, eax
inc edx
mov dword [esp + 0x9c], ebx
mov dword [esp + 0xa0], edi
mov dword [esp + 0x3c], edx
cmp ebp, 0x100
jge 0x408120
mov edx, dword [esp + 0x54]
lea eax, [ebp*2]
add edx, eax
mov dword [esp + 0xac], eax
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]
mov dword [esp + 0x58], edx
cmp edi, eax
jae 0x4080e0
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 0x408104
mov ebp, dword [esp + 0x18]
sub edi, eax
sub ebx, eax
mov ax, bp
shr ax, 5
sub bp, ax
mov word [edx], bp
mov ebp, dword [esp + 0xac]
mov dword [esp + 0xa0], edi
inc ebp
mov dword [esp + 0x68], ebp
mov dword [esp + 0x9c], ebx
cmp ebx, 0x1000000
jae 0x408087
jmp case.0x407ccf.14
mov al, byte [esp + 0x68]
and dword [esp + 0x78], 0
mov byte [esp + 0x50], al
jmp 0x4081f3
mov eax, dword [esp + 0x40]
test eax, eax
je 0x40892e
mov ecx, dword [esp + 0x3c]
shl ebx, 8
dec eax
mov dword [esp + 0x40], eax
movzx eax, byte [ecx]
shl edi, 8
or edi, eax
inc ecx
mov dword [esp + 0x9c], ebx
mov dword [esp + 0xa0], edi
mov dword [esp + 0x3c], ecx
cmp ebp, 0x100
jge 0x4081e5
mov edx, dword [esp + 0x54]
lea eax, [ebp*2]
add edx, eax
mov dword [esp + 0xac], eax
movzx ecx, word [edx]
mov eax, ebx
shr eax, 0xb
imul eax, ecx
mov dword [esp + 0x58], edx
mov dword [esp + 0x18], ecx
cmp edi, eax
jae 0x4081ad
mov ebx, eax
mov eax, 0x800
sub eax, ecx
sar eax, 5
add eax, ecx
mov word [edx], ax
add ebp, ebp
jmp 0x4081cd
mov ebp, dword [esp + 0xac]
sub edi, eax
sub ebx, eax
mov ax, cx
shr ax, 5
sub cx, ax
mov dword [esp + 0xa0], edi
mov word [edx], cx
inc ebp
mov dword [esp + 0x68], ebp
mov dword [esp + 0x9c], ebx
cmp ebx, 0x1000000
jae 0x408165
jmp case.0x407ccf.15
mov al, byte [esp + 0x68]
mov byte [esp + 0x50], al
jmp 0x4081f3
mov al, byte [esp + 0x50]
mov edx, dword [esp + 0x48]
test edx, edx
je 0x408938
mov ecx, dword [esp + 0x44]
inc dword [esp + 0x4c]
mov byte [ecx], al
inc ecx
dec edx
mov dword [esp + 0x48], edx
mov edx, dword [esp + 0xa4]
mov dword [esp + 0x44], ecx
mov ecx, dword [esp + 0x98]
mov byte [ecx + edx], al
mov eax, ecx
inc eax
xor edx, edx
div dword [esp + 0x38]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x98], edx
jmp 0x4086e1
cmp esi, 1
jne 0x40825d
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0xa8]
push 8
lea ecx, [ecx + eax*2]
add ecx, 0x198
jmp 0x407f56
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 + 0x74], eax
mov eax, dword [esp + 0xa8]
add eax, 0x664
mov dword [esp + 0x54], eax
mov dword [esp + 0x2c], 0x16
jmp 0x4086ed
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0xa8]
test esi, esi
jne 0x4082d4
add eax, 0xf
shl eax, 4
add eax, dword [esp + 0xb0]
push 9
lea ecx, [ecx + eax*2]
jmp 0x407f56
lea ecx, [ecx + eax*2]
add ecx, 0x1b0
mov dword [esp + 0x58], ecx
mov dword [esp + 0x28], 0xa
jmp 0x40873d
test esi, esi
jne 0x4083fb
cmp dword [esp + 0x4c], esi
je case.default.0x407ccf
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 0x408942
mov eax, dword [esp + 0x98]
sub eax, edx
mov edx, dword [esp + 0x38]
cmp eax, edx
jb 0x408332
add eax, edx
mov edx, dword [esp + 0xa4]
mov ecx, dword [esp + 0x98]
mov al, byte [eax + edx]
mov byte [ecx + edx], al
mov byte [esp + 0x50], al
mov eax, ecx
inc eax
xor edx, edx
div dword [esp + 0x38]
mov ecx, dword [esp + 0x44]
mov al, byte [esp + 0x50]
inc dword [esp + 0x4c]
mov byte [ecx], al
inc ecx
dec dword [esp + 0x48]
push 2
mov dword [esp + 0x48], ecx
pop eax
mov dword [esp + 0x98], edx
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x24], eax
jmp 0x407cc6
test esi, esi
jne 0x408392
mov eax, dword [esp + 0x84]
jmp 0x4083e7
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 0x40873d
test esi, esi
jne 0x4083c4
mov eax, dword [esp + 0x88]
jmp 0x4083d9
mov ecx, dword [esp + 0x88]
mov eax, dword [esp + 0x8c]
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 + 0x54], eax
mov dword [esp + 0x2c], 0x15
jmp 0x4086ed
cmp dword [esp + 0x74], 7
push 0xb
pop eax
cmovl eax, dword [esp + 0xbc]
mov dword [esp + 0x74], eax
jmp 0x408652
cmp dword [esp + 0x7c], 4
mov ecx, dword [esp + 0xa8]
push 3
pop eax
cmovl eax, dword [esp + 0x7c]
shl eax, 7
add ecx, 0x360
add eax, ecx
push 6
mov dword [esp + 0x58], eax
pop esi
mov dword [esp + 0x30], 0x19
jmp 0x408810
cmp ebp, 4
jl 0x4084a8
mov esi, ebp
sar esi, 1
mov eax, ebp
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 0x4084a1
mov ecx, dword [esp + 0xa8]
sub eax, ebp
add ecx, 0x55e
lea eax, [ecx + eax*2]
jmp 0x40853b
xor ebp, ebp
lea ecx, [esi - 4]
jmp 0x4084e3
mov edx, ebp
jmp 0x408646
mov eax, dword [esp + 0x40]
test eax, eax
je 0x40894c
mov edx, dword [esp + 0x3c]
shl ebx, 8
dec eax
mov dword [esp + 0x40], eax
movzx eax, byte [edx]
shl edi, 8
or edi, eax
inc edx
mov dword [esp + 0x9c], ebx
mov dword [esp + 0xa0], edi
mov dword [esp + 0x3c], edx
dec ecx
mov dword [esp + 0x64], ecx
test ecx, ecx
jle 0x408518
shr ebx, 1
add ebp, ebp
mov dword [esp + 0x9c], ebx
mov dword [esp + 0x68], ebp
cmp edi, ebx
jb 0x40850e
sub edi, ebx
or ebp, 1
mov dword [esp + 0xa0], edi
mov dword [esp + 0x68], ebp
cmp ebx, 0x1000000
jae 0x4084e2
jmp case.0x407ccf.12
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0xa8]
shl ebp, 4
add ecx, ebp
push 4
mov dword [esp + 0x20], ecx
mov dword [esp + 0x84], ecx
add eax, 0x644
pop esi
mov dword [esp + 0x54], eax
xor eax, eax
inc eax
xor ebp, ebp
mov dword [esp + 0x6c], esi
mov dword [esp + 0x5c], eax
mov dword [esp + 0x68], ebp
xor ecx, ecx
jmp 0x40858c
mov eax, dword [esp + 0x40]
test eax, eax
je 0x40895d
mov edx, dword [esp + 0x3c]
shl ebx, 8
dec eax
mov dword [esp + 0x40], eax
movzx eax, byte [edx]
shl edi, 8
or edi, eax
inc edx
mov dword [esp + 0x9c], ebx
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 0x408640
mov edx, dword [esp + 0x54]
add eax, eax
add edx, eax
mov dword [esp + 0x10], eax
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 + 0x58], edx
mov dword [esp + 0xac], eax
cmp edi, eax
jae 0x4085ea
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 0x408628
sub edi, dword [esp + 0xac]
sub ebx, dword [esp + 0xac]
xor eax, eax
inc eax
shl eax, cl
mov dword [esp + 0xa0], edi
or ebp, eax
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 0x408587
jmp case.0x407ccf.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 0x408956
cmp edx, dword [esp + 0x4c]
ja case.default.0x407ccf
mov eax, dword [esp + 0x7c]
add eax, 2
add dword [esp + 0x4c], eax
mov dword [esp + 0x7c], eax
cmp dword [esp + 0x48], 0
je 0x408967
mov eax, dword [esp + 0x98]
sub eax, edx
mov edx, dword [esp + 0x38]
cmp eax, edx
jb 0x408691
add eax, edx
mov edx, dword [esp + 0xa4]
mov ecx, dword [esp + 0x98]
mov al, byte [eax + edx]
mov byte [ecx + edx], al
mov byte [esp + 0x50], al
mov eax, ecx
inc eax
xor edx, edx
div dword [esp + 0x38]
mov ecx, dword [esp + 0x44]
mov al, byte [esp + 0x50]
mov byte [ecx], al
mov eax, dword [esp + 0x7c]
inc ecx
dec dword [esp + 0x48]
dec eax
mov dword [esp + 0x44], ecx
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x7c], eax
mov dword [esp + 0x98], edx
mov edx, dword [esp + 0x1c]
test eax, eax
jg case.0x407ccf.28
push 2
pop eax
jmp 0x408378
mov eax, dword [esp + 0x54]
mov ecx, eax
mov dword [esp + 0x58], ecx
mov dword [esp + 0x28], 0x12
jmp 0x40873d
test esi, esi
jne 0x408724
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 0x408808
mov ecx, dword [esp + 0x54]
add ecx, 2
mov dword [esp + 0x58], ecx
mov dword [esp + 0x28], 0x13
jmp 0x40873d
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 0x408763
mov ebx, eax
mov eax, 0x800
sub eax, esi
sar eax, 5
add eax, edx
mov word [ecx], ax
xor esi, esi
jmp 0x40877e
sub edi, eax
sub ebx, eax
mov ax, dx
shr ax, 5
sub dx, ax
xor esi, esi
mov dword [esp + 0xa0], edi
mov word [ecx], dx
inc esi
mov dword [esp + 0x6c], esi
mov dword [esp + 0x9c], ebx
cmp ebx, 0x1000000
jae 0x4087c4
mov eax, dword [esp + 0x40]
test eax, eax
je 0x408971
mov ecx, dword [esp + 0x3c]
shl ebx, 8
dec eax
mov dword [esp + 0x40], eax
movzx eax, byte [ecx]
shl edi, 8
or edi, eax
inc ecx
mov dword [esp + 0x9c], ebx
mov dword [esp + 0xa0], edi
mov dword [esp + 0x3c], ecx
mov eax, dword [esp + 0x28]
jmp 0x408374
test esi, esi
jne 0x4087f1
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 0x408716
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
inc edx
mov dword [esp + 0x5c], edx
mov ecx, esi
jmp 0x408857
mov eax, dword [esp + 0x40]
test eax, eax
je 0x40897b
mov edx, dword [esp + 0x3c]
shl ebx, 8
dec eax
mov dword [esp + 0x40], eax
movzx eax, byte [edx]
shl edi, 8
or edi, eax
inc edx
mov dword [esp + 0x9c], ebx
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 0x4088dd
lea eax, [edx + edx]
mov edx, dword [esp + 0x54]
add edx, eax
mov dword [esp + 0xac], eax
movzx ebp, word [edx]
mov eax, ebx
shr eax, 0xb
imul eax, ebp
mov dword [esp + 0x58], edx
mov dword [esp + 0x18], ebp
cmp edi, eax
jae 0x4088a1
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 0x4088c5
sub edi, eax
sub ebx, eax
mov ax, bp
shr ax, 5
sub bp, ax
mov eax, dword [esp + 0xac]
inc eax
mov dword [esp + 0xa0], edi
mov word [edx], bp
mov dword [esp + 0x5c], eax
mov dword [esp + 0x9c], ebx
cmp ebx, 0x1000000
jae 0x408852
jmp case.0x407ccf.24
xor eax, eax
inc eax
mov ecx, esi
shl eax, cl
mov ebp, edx
sub ebp, eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x68], ebp
jmp 0x408374
mov eax, dword [esp + 0x2c]
add dword [esp + 0x7c], ebp
mov dword [esp + 0x24], eax
jmp 0x407cc6
mov dword [esp + 0x24], 1
jmp 0x408983
mov dword [esp + 0x24], 3
jmp 0x408983
mov dword [esp + 0x24], 0xd
jmp 0x408983
mov dword [esp + 0x24], 0xe
jmp 0x408983
mov dword [esp + 0x24], 0xf
jmp 0x408983
mov dword [esp + 0x24], 0x1a
jmp 0x408983
mov dword [esp + 0x24], 0x1b
jmp 0x408983
mov dword [esp + 0x24], 0xc
jmp 0x408983
or dword [esp + 0x7c], 0xffffffff
jmp 0x408983
mov dword [esp + 0x24], 0x10
jmp 0x408983
mov dword [esp + 0x24], 0x1c
jmp 0x408983
mov dword [esp + 0x24], 5
jmp 0x408983
mov dword [esp + 0x24], 0x18
mov edi, dword [esp + 0xc0]
push 0x22
pop ecx
lea esi, [esp + 0x24]
rep movsd dword es:[edi], dword [esi]
xor eax, eax
jmp 0x40899a
or eax, 0xffffffff
pop ebp
pop ebx
pop edi
pop esi
add esp, 0xb8
ret