Function at 0x407880
Capabilities:
Check for time delay via gettickcount
Encrypt data using speck

Disassembly:
sub esp, 0x110
push ebx
push ebp
push esi
push edi
mov di, word [esp + 0x130]
mov esi, ecx
mov dword [esp + 0x28], edx
mov eax, 0x7fff
mov edx, dword [esp + 0x138]
mov dword [esp + 0x1c], esi
movzx ebp, di
mov dword [esp + 0x40], eax
cmp edx, 0xffc3d44f
je 0x4078cc
cmp edx, 0xffc3d44e
je 0x4078cc
mov byte [esp + 0x1a], 0
cmp edx, 0xffc3d44d
jne 0x4078d1
mov byte [esp + 0x1a], 1
mov ecx, dword [0x4e980c]
mov ebx, dword [esp + 0x12c]
test ecx, ecx
jne 0x4078ef
lea eax, [esp + 0x4c]
mov dword [esp + 0x14], eax
jmp 0x4079b3
mov eax, dword [0x4e987c]
imul esi, eax, 0xd4
inc eax
add esi, ecx
xor ecx, ecx
cmp eax, dword [0x4e7028]
mov dword [esp + 0x14], esi
cmovge eax, ecx
mov dword [0x4e987c], eax
mov eax, dword [esp + 0x134]
mov byte [esi], bl
mov byte [esi + 6], al
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
mov dword [0x4e9878], eax
sub ecx, dword [0x4ec4cc]
mov dword [0x4ec4cc], eax
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
shr ecx, 0x1f
addsd xmm0, qword [ecx*8 + 0x4e1280]
cvtpd2ps xmm0, xmm0
divss xmm0, dword [0x4e11b4]
movss dword [esi + 8], xmm0
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov esi, eax
mov eax, dword [esp + 0x14]
lea ecx, [eax + 0xc]
test esi, esi
je 0x407995
cmp esi, dword [0x4e9874]
je 0x40798e
push esi
push ecx
push 0x418
push dword [0x4e97f4]
call dword [sym.imp.USER32.dll_PostMessageW]
mov eax, dword [esp + 0x14]
jmp 0x4079a2
xor edx, edx
mov word [ecx], dx
jmp 0x4079a2
mov dword [ecx], 0x2f004e
mov dword [ecx + 4], 0x41
mov edx, dword [esp + 0x138]
mov dword [0x4e9874], esi
mov esi, dword [esp + 0x1c]
cmp bl, 0xe7
jne 0x407a0a
mov ebx, dword [esp + 0x14]
mov ecx, dword [esp + 0x128]
push 0x7fff
push ebx
push edx
push dword [esp + 0x140]
mov ax, word [ecx + 4]
push 0
mov word [ebx + 2], ax
mov eax, 0x55
push 0xe7
push ecx
mov word [ebx + 4], ax
mov ecx, esi
push dword [esp + 0x140]
mov edx, dword [esp + 0x48]
call fcn.00409350
add esp, 0x20
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x110
ret
mov word [eax + 2], di
mov cl, 3
mov al, bl
mov edi, 0x20
add al, 0x64
cmp cl, al
sbb eax, eax
and eax, ebp
cmp esi, dword [0x4e9810]
mov esi, dword [0x4ec680]
movzx eax, ax
mov dword [esp + 0x20], eax
jne 0x407a68
mov cl, byte [esp + 0x13c]
mov edx, dword [esp + 0x134]
and cl, 1
mov dword [esp + 0x30], ecx
jne 0x407afc
movzx ecx, bl
mov al, dl
xor al, 1
shl al, 7
mov byte [ecx + 0x4ea1e8], al
mov ecx, dword [esp + 0x30]
jmp 0x407afc
mov edx, dword [esp + 0x13c]
mov ecx, edx
movzx ebp, bl
shr ecx, 4
and ecx, 0xffffff01
mov dword [esp + 0x30], ecx
lea eax, [ebp*4]
add eax, ebp
cmp byte [esi + eax*4 + 8], 0
jne 0x407af5
test dl, 0x10
jne 0x407af5
cmp bl, 0xa0
je 0x407aa0
cmp bl, 0xa1
jne 0x407ac5
mov edx, dword [esp + 0x134]
test dl, dl
jne 0x407ac5
cmp bl, 0xa0
mov dword [esp + 0x3c], 0x10
mov eax, edi
cmove eax, dword [esp + 0x3c]
test byte [0x4ea1d7], al
jne 0x407afc
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edx, dword [esp + 0x134]
mov ecx, dword [esp + 0x30]
mov esi, dword [0x4ec680]
mov dword [0x4ec63c], eax
mov dword [0x4ec638], eax
mov al, dl
xor al, 1
shl al, 7
mov byte [ebp + 0x4ea1e8], al
jmp 0x407afc
mov edx, dword [esp + 0x134]
cmp byte [esp + 0x1a], 0
je 0x407b0a
mov eax, 0x69
jmp 0x407b17
mov eax, 0x61
test cl, cl
cmovne edi, eax
movzx eax, di
cmp byte [0x4ea1d5], 0
mov edi, dword [esp + 0x14]
lea ecx, [edi + 4]
mov word [ecx], ax
mov dword [esp + 0x38], ecx
je 0x407b58
cmp bl, 0x5b
je 0x407b38
cmp bl, 0x5c
jne 0x407b58
test dl, dl
jne 0x407b58
mov ebp, dword [esp + 0x138]
push 0
push SysReAllocString
push 0x7fff
push edi
push ebp
push 0
jmp 0x40919e
cmp byte [0x4ec672], 0
mov ebp, dword [sym.imp.USER32.dll_FindWindowW]
je 0x407bfe
cmp bl, 0x1b
jne 0x407bfe
test dl, dl
jne 0x407bfe
push 0
push str.32771
call ebp
test eax, eax
je 0x407bf8
push 0
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp esi, eax
jne 0x407bf8
push 0xffc3d44d
push 0
push 0
push 0
mov dl, bl
xor ecx, ecx
call fcn.004130d0
mov dl, byte [0x4ea1e6]
mov ecx, 1
push 0xffc3d44d
shr dl, 3
push 0
and dl, 1
push 0
push 0
or dl, 0xa4
call fcn.004130d0
mov ebp, dword [esp + 0x158]
add esp, 0x20
push 0
push SysReAllocString
push 0x7fff
push edi
push ebp
push 0
push ecx
push 0x1b
jmp 0x4091a0
mov esi, dword [0x4ec680]
mov edx, dword [esp + 0x20]
movzx eax, dx
mov dword [esp + 0x30], eax
lea ecx, [eax + eax*4]
mov eax, dword [0x4ec684]
lea edi, [eax + ecx*4]
mov eax, dword [esp + 0x1c]
mov cl, byte [edi + 0x13]
mov byte [esp + 0x19], cl
cmp eax, dword [0x4e9814]
jne 0x407c2b
test cl, cl
jne 0x407c34
movzx eax, bl
lea eax, [eax + eax*4]
lea edi, [esi + eax*4]
cmp byte [esp + 0x1a], 0
je 0x407ca5
mov ecx, dword [esp + 0x138]
mov eax, dword [esp + 0x134]
cmp ecx, 0xffc3d44e
jne 0x407c6f
test al, al
je 0x407c6f
cmp dword [0x4ea310], edi
jne 0x407c6f
mov byte [edi + 0xd], 0
mov byte [edi + 0x10], 0
mov dword [0x4ea310], 0
push 0x7fff
push dword [esp + 0x18]
push ecx
push eax
push edx
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x30]
push ebx
push dword [esp + 0x140]
push dword [esp + 0x140]
call fcn.00409350
add esp, 0x20
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x110
ret
mov ecx, dword [esp + 0x134]
mov eax, 0x7fff
mov dword [esp + 0x48], eax
test cl, cl
jne 0x407cc0
mov byte [edi + 0x11], cl
mov word [edi + 4], ax
mov esi, dword [esp + 0x1c]
cmp esi, dword [0x4e9810]
jne 0x407d48
test bl, bl
jne 0x407d0c
mov ebp, dword [esp + 0x138]
push 0x7fff
push dword [esp + 0x18]
push ebp
push ecx
push edx
push 0
push dword [esp + 0x140]
mov edx, dword [esp + 0x44]
mov ecx, esi
push dword [esp + 0x140]
call fcn.00409350
add esp, 0x20
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x110
ret
cmp bl, 1
je 0x407d16
cmp bl, 2
jne 0x407d48
cmp dword [0x4e96bc], 0
jne 0x407d76
push 0
push str.32768
call ebp
test eax, eax
je 0x407d3d
push 0
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
cmp eax, dword [0x4eb0cc]
je 0x407d6b
mov ecx, dword [esp + 0x134]
mov edx, dword [esp + 0x20]
mov eax, dword [0x4ea310]
test eax, eax
je 0x407db0
cmp eax, edi
je 0x407db0
test cl, cl
jne 0x407db0
cmp esi, dword [0x4e9814]
jne 0x407d9a
xor eax, eax
cmp byte [edi + 8], al
sete al
jmp 0x407da3
mov ecx, dword [esp + 0x134]
mov edx, dword [esp + 0x20]
mov byte [edi + 0x10], 0
mov ebp, dword [esp + 0x138]
mov al, cl
push 0x7fff
push dword [esp + 0x18]
xor al, 1
push ebp
push ecx
push edx
mov byte [edi + 0xd], al
push ebx
jmp 0x407ce5
mov eax, dword [0x4ea310]
movzx eax, byte [eax + 8]
test eax, eax
je 0x407db0
mov eax, dword [0x4ea310]
mov byte [eax + 0x12], 1
cmp byte [edi + 9], 0
jne 0x407dbc
cmp byte [edi + 0xa], 0
je 0x407d7a
mov dword [esp + 0x34], 0
mov ebp, 0x7fff
mov dword [esp + 0x24], ebp
mov dword [esp + 0x2c], ebp
test cl, cl
je 0x407e02
mov dh, byte [edi + 0x10]
mov al, byte [edi + 0xd]
mov byte [esp + 0x13], al
movzx eax, word [edi + 4]
mov byte [esp + 0x12], dh
mov edx, ebp
mov byte [edi + 0x10], 0
cmp ax, dx
je 0x407e12
mov ebp, eax
mov word [edi + 4], dx
mov dword [esp + 0x24], ebp
mov dword [esp + 0x2c], ebp
jmp 0x407e12
mov al, byte [esp + 0x13]
mov byte [esp + 0x13], al
mov al, byte [esp + 0x13]
mov byte [esp + 0x12], al
mov al, cl
xor dl, dl
xor al, 1
mov byte [edi + 0xd], al
cmp esi, dword [0x4e9814]
jne 0x407e91
cmp byte [edi + 8], dl
je 0x407ead
mov eax, dword [0x4ec680]
cmp byte [eax + 0xcb5], dl
jne 0x407e45
cmp byte [eax + 0xcc9], dl
jne 0x407e45
xor cl, cl
jmp 0x407e47
mov cl, 1
cmp byte [eax + 0xcdd], 0
mov byte [eax + 0x161], cl
jne 0x407e63
cmp byte [eax + 0xcf1], 0
jne 0x407e63
xor cl, cl
jmp 0x407e65
mov cl, 1
cmp byte [eax + 0xc8d], 0
mov byte [eax + 0x175], cl
jne 0x407e87
cmp byte [eax + 0xca1], 0
jne 0x407e87
xor cl, cl
mov byte [eax + 0x14d], cl
jmp 0x407ead
mov cl, 1
mov byte [eax + 0x14d], cl
jmp 0x407ead
cmp dword [0x4e9814], 0
jne 0x407ead
mov cl, 1
call fcn.00415950
mov byte [0x4ea1e5], al
mov dl, 1
mov byte [0x4ea1e6], al
mov eax, dword [edi]
test eax, eax
je 0x407ebd
cmp dword [eax], 7
mov byte [esp + 0x1a], 1
je 0x407ec2
mov byte [esp + 0x1a], 0
test dl, dl
jne 0x407ecd
mov cl, 1
call fcn.00415950
mov cl, byte [edi + 9]
mov eax, dword [esp + 0x134]
test cl, cl
je 0x408161
test al, al
jne 0x408161
mov eax, dword [0x4ea310]
test eax, eax
je 0x407efe
cmp byte [edi + 0xa], 0
je 0x407efe
cmp edi, eax
jne 0x40815a
cmp cl, 1
jne 0x407fa9
cmp byte [esp + 0x19], 0
mov ecx, dword [esp + 0x30]
jne 0x407f15
movzx ecx, bl
xor edx, edx
movzx eax, cx
cmp byte [esp + 0x19], dl
mov dword [esp + 0x44], ecx
cmovne edx, eax
movzx eax, cl
xor ecx, ecx
cmp byte [esp + 0x19], cl
push 0
cmovne eax, ecx
mov cl, al
call fcn.00415b60
mov ch, al
xor edx, edx
xor eax, eax
mov byte [esp + 0x1f], ch
add esp, 4
mov dword [esp + 0x3c], edx
cmp ax, word [0x4ea340]
jae 0x40808d
mov cl, byte [0x4e989b]
nop
cmp byte [esp + 0x19], 0
mov eax, dword [0x4ea330]
mov ebp, dword [eax + edx*4]
je 0x407f75
movzx eax, word [ebp + 0xa]
jmp 0x407f79
movzx eax, byte [ebp + 0x11]
cmp dword [esp + 0x44], eax
je 0x407f88
test byte [ebp + 0xe], ch
je 0x408075
cmp word [ebp + 6], 0
je 0x408014
cmp byte [ebp + 0x19], 0
je 0x408075
test cl, cl
jne 0x408075
mov esi, dword [esp + 0x1c]
xor dl, dl
cmp edi, dword [0x4ea310]
je 0x407fbc
mov dword [0x4ea310], edi
mov byte [edi + 0x12], dl
cmp byte [edi + 0xa], 0
je 0x4080dd
mov al, byte [edi + 8]
mov cl, byte [0x4ea1e5]
test al, al
je 0x407fd7
not al
and cl, al
test cl, cl
jne 0x407fe9
test dl, dl
jne 0x407fe9
test byte [edi + 0xc], 1
je 0x4080dd
cmp esi, dword [0x4e9814]
jne 0x408094
cmp byte [esp + 0x19], 0
je 0x408094
mov eax, dword [0x4ec678]
movzx ecx, cl
shl ecx, 9
add ecx, dword [esp + 0x30]
jmp 0x4080a4
mov esi, dword [ebp + 0x20]
mov eax, esi
test eax, eax
je 0x408075
nop dword [eax]
cmp byte [eax + 0x1c], 0
jne 0x408030
mov eax, dword [eax + 8]
test eax, eax
jne 0x408020
jmp 0x408075
cmp byte [esi + 0x1c], 0
je 0x408066
test cl, cl
je 0x408045
mov ecx, esi
call fcn.004916e0
test al, al
je 0x408060
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x407fa5
mov edx, dword [ebp + 0x1c]
call fcn.0040c440
test eax, eax
jne 0x407fa5
mov cl, byte [0x4e989b]
mov esi, dword [esi + 8]
test esi, esi
jne 0x408030
mov edx, dword [esp + 0x3c]
mov ch, byte [esp + 0x1b]
movzx eax, word [0x4ea340]
inc edx
mov dword [esp + 0x3c], edx
cmp edx, eax
jl 0x407f60
mov esi, dword [esp + 0x1c]
mov dl, 1
jmp 0x407fbc
movzx ecx, cl
movzx eax, bl
shl ecx, 8
add ecx, eax
mov eax, dword [0x4ec674]
movzx eax, word [eax + ecx*2]
movzx ebp, ax
mov dword [esp + 0x24], ebp
mov dword [esp + 0x2c], ebp
test ax, ax
jns 0x4080be
mov word [edi + 4], ax
jmp 0x4080eb
and eax, 0x7fff
cmp ax, word [0x4ea340]
jae 0x4080e1
mov ecx, eax
mov eax, dword [0x4ec67c]
mov ax, word [eax + ecx*2]
mov word [edi + 4], ax
jmp 0x4080e1
mov ebp, dword [esp + 0x24]
mov eax, 0x7fff
cmp bp, ax
jne 0x40815a
test dl, dl
je 0x4080ff
mov eax, dword [esp + 0x38]
mov ecx, 0x23
or byte [edi + 0xc], 8
mov word [eax], cx
cmp byte [edi + 8], 0
jne 0x40813d
test byte [edi + 0xc], 1
jne 0x40813d
cmp byte [esp + 0x1a], 0
jne 0x40813d
test dl, dl
jne 0x40813d
mov ebp, dword [esp + 0x138]
push 0
push SysReAllocString
push 0x7fff
push dword [esp + 0x20]
mov byte [edi + 0x11], 1
push ebp
push 0
push ecx
push ebx
mov ecx, esi
jmp 0x4091a4
mov ebp, dword [esp + 0x138]
push 0x7fff
push dword [esp + 0x18]
push ebp
push 0
push dword [esp + 0x30]
push ebx
jmp 0x407ce5
mov eax, dword [esp + 0x134]
cmp byte [edi + 0xa], 0
mov byte [esp + 0x1b], 0
je 0x4081f7
test al, al
je 0x4081f7
mov ch, byte [esp + 0x12]
cmp dword [0x4ea310], edi
jne 0x408192
test ch, ch
je 0x4081f7
mov dword [0x4ea310], 0
cmp byte [edi + 0xb], 0
jne 0x4081f2
mov cl, byte [edi + 0xc]
test cl, 8
je 0x4081aa
xor dl, dl
and cl, 0xf7
mov byte [edi + 0xc], cl
jmp 0x4081ac
mov dl, 1
test ch, ch
je 0x4081d6
test dl, dl
je 0x4081d6
mov ebp, dword [esp + 0x138]
push 0
push SysReAllocString
push 0x7fff
push dword [esp + 0x20]
push ebp
push eax
push ecx
push ebx
mov ecx, esi
jmp 0x4091a4
mov ebp, dword [esp + 0x138]
push 0x7fff
push dword [esp + 0x18]
push ebp
push eax
push dword [esp + 0x30]
push ebx
jmp 0x407ce5
mov byte [esp + 0x1b], 1
cmp byte [edi + 9], 0
je 0x408385
test al, al
je 0x408385
mov eax, dword [0x4ea310]
xor ecx, ecx
cmp eax, edi
cmove eax, ecx
mov dword [0x4ea310], eax
cmp byte [edi + 0xe], cl
je 0x408239
push 0xffc3d44d
push ecx
push ecx
mov byte [edi + 0xe], cl
mov dl, 0x12
push ecx
mov ecx, 1
call fcn.004130d0
add esp, 0x10
cmp byte [edi + 0xf], 0
je 0x40825d
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0x10
mov byte [edi + 0xf], 0
mov ecx, 1
call fcn.004130d0
add esp, 0x10
mov edx, 0x7fff
cmp bp, dx
jne 0x408295
mov al, byte [edi + 0xc]
test al, 8
je 0x408295
and al, 0xf7
mov byte [edi + 0xc], al
mov ebp, dword [esp + 0x138]
push 0x7fff
push dword [esp + 0x18]
push ebp
push dword [esp + 0x140]
push dword [esp + 0x30]
push ebx
jmp 0x407ce5
mov cl, byte [esp + 0x1a]
mov al, byte [edi + 0x12]
test cl, cl
je 0x40832f
cmp al, 2
jne 0x408303
mov ebp, dword [esp + 0x20]
mov dl, bl
push 0xffc3d44e
push 0
push 0
push ebp
mov ecx, 1
call fcn.004130d0
push 0xffc3d44d
push 0
push 0
push ebp
mov dl, bl
mov ecx, 2
call fcn.004130d0
add esp, 0x20
mov ebp, dword [esp + 0x138]
push 0
push SysReAllocString
push 0x7fff
push dword [esp + 0x20]
push ebp
push dword [esp + 0x148]
push ecx
push ebx
mov ecx, esi
jmp 0x4091a4
cmp al, 1
je 0x408273
cmp byte [edi + 0xa], 0
jne 0x408374
cmp byte [edi + 8], 0
jne 0x408273
test byte [edi + 0xc], 1
jne 0x408273
test cl, cl
jne 0x408273
jmp 0x4082db
test al, al
je 0x40830b
cmp bp, dx
jne 0x40830b
cmp byte [edi + 8], 0
jne 0x408273
test byte [edi + 0xc], 1
mov ebp, dword [esp + 0x138]
jne 0x40827a
push 0
push SysReAllocString
push 0x7fff
push dword [esp + 0x20]
push ebp
push dword [esp + 0x148]
push ecx
push ebx
mov ecx, esi
jmp 0x4091a4
cmp byte [esp + 0x13], 0
jne 0x408385
cmp byte [edi + 0xb], 0
je 0x408273
cmp dword [0x4ea310], 0
mov edx, 0x7ffd
mov byte [esp + 0x12], 0
je 0x408790
mov ecx, dword [esp + 0x134]
test cl, cl
je 0x4083b1
cmp byte [edi + 0xb], 0
je 0x408790
mov eax, 0x7fff
cmp bp, ax
jne 0x408aa0
movzx ebp, word [edi + 6]
xor esi, esi
cmp bp, ax
je 0x40857b
nop
mov eax, dword [0x4ea330]
movzx ecx, bp
mov edx, dword [eax + ecx*4]
mov al, byte [edx + 0x11]
test al, al
jne 0x408420
cmp word [edx + 0xa], 0
je 0x40845a
movzx ebp, word [edx + 0xc]
movzx eax, word [edx + 0xa]
lea ecx, [eax + eax*4]
mov eax, dword [0x4ec684]
lea eax, [eax + ecx*4]
cmp byte [eax + 0xd], 0
je 0x408448
cmp byte [edx + 0x16], 0
je 0x408439
cmp byte [esp + 0x134], 0
jne 0x408458
mov ax, word [edx + 4]
mov word [edi + 4], ax
test esi, esi
jne 0x408462
jmp 0x408448
movzx ebp, word [edx + 0xc]
test al, al
je 0x4083ed
mov ecx, dword [0x4ec680]
movzx eax, al
lea eax, [eax + eax*4]
lea eax, [ecx + eax*4]
jmp 0x4083fc
cmp byte [esp + 0x134], 0
jne 0x408448
test esi, esi
cmove esi, edx
mov eax, 0x7fff
cmp bp, ax
jne 0x4083d0
jmp 0x40845a
mov esi, edx
test esi, esi
je 0x40856f
movzx ecx, byte [esi + 0x11]
cmp ecx, 0x12
ja case.0x408476.1
movzx eax, byte [ecx + 0x4091d4]
jmp dword [eax*4 + 0x4091c0]
mov ecx, dword [0x4ec680]
mov eax, 0xc80
mov edx, 0xc94
cmp byte [ecx + 0xca1], 0
cmovne eax, edx
add eax, ecx
jmp 0x4084f4
mov ecx, dword [0x4ec680]
mov eax, 0xca8
mov edx, 0xcbc
cmp byte [ecx + 0xcc9], 0
cmovne eax, edx
add eax, ecx
jmp 0x4084f4
mov ecx, dword [0x4ec680]
mov eax, 0xcd0
mov edx, 0xce4
cmp byte [ecx + 0xcf1], 0
cmovne eax, edx
add eax, ecx
jmp 0x4084f4
movzx eax, word [esi + 0xa]
lea ecx, [eax + eax*4]
mov eax, dword [0x4ec684]
lea eax, [eax + ecx*4]
jmp 0x4084f4
lea eax, [ecx + ecx*4]
mov ecx, dword [0x4ec680]
lea eax, [ecx + eax*4]
mov dword [0x4ea310], eax
movzx eax, word [esi + 6]
test ax, ax
je 0x408508
mov dword [esp + 0x2c], eax
jmp 0x40855f
movzx eax, word [esi + 4]
lea ecx, [esp + 0x2c]
mov ebp, dword [esp + 0x138]
mov dl, byte [esp + 0x134]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x38]
push eax
lea eax, [esp + 0x16]
push eax
lea eax, [edi + 0xc]
push eax
push ebp
call fcn.0040ce10
add esp, 0x10
mov dword [esp + 0x34], eax
test eax, eax
jne 0x40855b
push 0x7fff
push dword [esp + 0x18]
push ebp
push dword [esp + 0x140]
push dword [esp + 0x30]
jmp 0x407c7b
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x24], eax
movzx ebp, ax
mov eax, dword [0x4ea310]
mov byte [eax + 0x12], 2
mov ecx, dword [esp + 0x134]
mov edx, 0x7ffd
mov eax, 0x7ffe
cmp bp, ax
je 0x40858e
cmp bp, dx
jne 0x40878c
test cl, cl
jne 0x408596
mov byte [edi + 0x10], 1
test byte [0x4ea1e6], 0xc
jne 0x4085bd
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0x12
xor ecx, ecx
call fcn.004130d0
mov ecx, dword [esp + 0x144]
add esp, 0x10
cmp bl, 0xa2
je 0x4085c7
cmp bl, 0xa3
jne 0x4085ea
mov esi, dword [esp + 0x20]
test cl, cl
jne 0x4085ee
push 0xffc3d44d
push 0
push 0
push esi
mov dl, bl
mov ecx, 1
call fcn.004130d0
add esp, 0x10
jmp 0x4085ee
mov esi, dword [esp + 0x20]
mov eax, dword [0x4ea310]
mov byte [eax + 0xe], 1
mov eax, 0x7ffd
cmp bp, ax
jne 0x40862f
test byte [0x4ea1e6], 0x30
jne 0x408621
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0x10
xor ecx, ecx
call fcn.004130d0
add esp, 0x10
mov eax, dword [0x4ea310]
mov byte [eax + 0xf], 1
jmp 0x4086ac
mov eax, 0x7ffe
cmp bp, ax
jne 0x4086ac
cmp bl, 0xa0
je 0x408643
cmp bl, 0xa1
jne 0x408666
cmp byte [esp + 0x134], 0
jne 0x408666
push 0xffc3d44d
push 0
push 0
push esi
mov dl, bl
mov ecx, 1
call fcn.004130d0
add esp, 0x10
test byte [0x4ea1e6], 0x10
je 0x408689
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0xa0
mov ecx, 1
call fcn.004130d0
add esp, 0x10
test byte [0x4ea1e6], 0x20
je 0x4086ac
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0xa1
mov ecx, 1
call fcn.004130d0
add esp, 0x10
test byte [0x4ea1e6], 1
je 0x4086cf
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0xa2
mov ecx, 1
call fcn.004130d0
add esp, 0x10
test byte [0x4ea1e6], 2
je 0x4086f2
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0xa3
mov ecx, 1
call fcn.004130d0
add esp, 0x10
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 9
mov ecx, 2
call fcn.004130d0
mov eax, 0x7ffd
add esp, 0x10
cmp bp, ax
jne 0x408753
mov eax, dword [0x4ea310]
cmp byte [eax + 0xf], 0
je 0x408753
cmp bl, 0x60
jb 0x40872b
cmp bl, 0x69
jbe 0x408730
cmp bl, 0x6e
jne 0x408753
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0x10
mov ecx, 1
call fcn.004130d0
mov eax, dword [0x4ea310]
add esp, 0x10
mov byte [eax + 0xf], 0
mov eax, dword [esp + 0x38]
mov ecx, 0x68
mov word [eax], cx
mov eax, dword [esp + 0x134]
test al, al
jne 0x40876e
mov byte [edi + 0x11], 1
mov ebp, dword [esp + 0x138]
push 0
push SysReAllocString
push 0x7fff
push dword [esp + 0x20]
push ebp
push eax
jmp 0x40919e
mov ebp, dword [esp + 0x24]
mov edx, 0x7fff
cmp bp, dx
jne 0x408b92
mov al, byte [edi + 8]
mov dl, byte [0x4ea1e5]
test al, al
je 0x4087af
not al
and dl, al
mov eax, dword [esp + 0x1c]
mov dh, byte [esp + 0x19]
cmp eax, dword [0x4e9814]
jne 0x4087d7
test dh, dh
je 0x4087d7
mov eax, dword [0x4ec678]
movzx ecx, dl
shl ecx, 9
add ecx, dword [esp + 0x30]
movzx ebp, bl
jmp 0x4087e7
mov eax, dword [0x4ec674]
movzx ecx, dl
movzx ebp, bl
shl ecx, 8
add ecx, ebp
movzx eax, word [eax + ecx*2]
movzx ecx, ax
movzx esi, ax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x2c], ecx
mov ecx, esi
cmp ax, word [esp + 0x48]
jne 0x4088cd
cmp byte [0x4ec672], 0
je 0x4088cd
cmp bl, 9
je 0x4088cd
mov eax, dword [esp + 0x1c]
and dl, 0xf3
cmp eax, dword [0x4e9814]
jne 0x408840
test dh, dh
je 0x408840
mov eax, dword [0x4ec678]
movzx ecx, dl
shl ecx, 9
add ecx, dword [esp + 0x30]
jmp 0x40884d
mov eax, dword [0x4ec674]
movzx ecx, dl
shl ecx, 8
add ecx, ebp
movzx eax, word [eax + ecx*2]
mov esi, 0x7ff9
movzx edx, ax
movzx ecx, ax
and eax, 0x7fff
mov dword [esp + 0x24], edx
mov dword [esp + 0x2c], edx
cmp ax, si
jbe 0x408878
mov ebp, 0x7fff
cmp ax, bp
jb 0x4088d6
mov ecx, dword [esp + 0x134]
mov ebp, dword [esp + 0x138]
mov edx, 0x7fff
test cl, cl
je 0x408b50
cmp byte [edi + 8], 0
jne 0x408b3c
test byte [edi + 0xc], 1
jne 0x408b3c
cmp byte [edi + 9], 0
je 0x408b3c
cmp byte [esp + 0x1a], 0
jne 0x408b3c
push 0
push SysReAllocString
push 0x7fff
jmp 0x409198
mov edx, dword [esp + 0x24]
mov ebp, 0x7fff
movzx eax, cx
mov ecx, dword [esp + 0x134]
test ax, ax
jns 0x4089c8
test cl, cl
jne 0x408a83
mov ah, byte [0x4ea1e5]
mov al, ah
mov word [edi + 4], dx
and al, 0xc0
movzx ecx, al
mov al, ah
neg ecx
sbb ecx, ecx
and ecx, 8
mov edx, ecx
or edx, 1
and al, 0xc
mov al, ah
cmove edx, ecx
mov ecx, edx
or ecx, 4
and al, 0x30
mov al, ah
cmove ecx, edx
movzx edx, word [edi + 6]
mov esi, ecx
or esi, 2
and al, 3
cmove esi, ecx
cmp dx, bp
je 0x40899f
nop word [eax + eax]
mov eax, dword [0x4ea330]
movzx ecx, dx
mov ecx, dword [eax + ecx*4]
cmp byte [ecx + 0x15], 0
movzx edx, word [ecx + 0xc]
jne 0x40896a
movzx eax, byte [ecx + 0xf]
mov ebx, dword [esp + 0x12c]
not eax
test byte [0x4ea1e5], al
jne 0x40899a
cmp byte [ecx + 0x16], 0
jne 0x40899a
cmp byte [ecx + 0x11], 0
jne 0x40899a
cmp word [ecx + 0xa], 0
jne 0x40899a
cmp word [ecx + 6], 0
jne 0x40899a
mov eax, esi
not eax
test dword [ecx], eax
jne 0x40899a
movzx eax, byte [0x4ea1e5]
not eax
test byte [ecx + 0xe], al
je 0x4089b4
cmp dx, bp
jne 0x408940
mov eax, 0x7fff
movzx ecx, ax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x2c], ecx
jmp 0x408a7c
movzx eax, word [ecx + 4]
movzx ecx, ax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x2c], ecx
jmp 0x408a7c
cmp ax, bp
je 0x40887f
and eax, 0x7fff
test cl, cl
je 0x408a64
cmp ax, word [0x4ea340]
jae 0x408a51
mov esi, eax
mov eax, dword [0x4ec67c]
cmp word [eax + esi*2], bp
je 0x408a51
cmp byte [esp + 0x1b], 0
mov ebp, dword [esp + 0x138]
jne 0x408a3e
push dword [esp + 0x38]
lea eax, [esp + 0x16]
mov dl, cl
push eax
lea eax, [edi + 0xc]
push eax
push ebp
lea ecx, [esp + 0x3c]
call fcn.0040ce10
add esp, 0x10
mov dword [esp + 0x34], eax
test eax, eax
je 0x408a37
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x134]
jmp 0x408a8a
mov ecx, dword [esp + 0x134]
mov eax, dword [0x4ec67c]
movzx eax, word [eax + esi*2]
mov dword [esp + 0x24], eax
mov dword [esp + 0x2c], eax
jmp 0x408a8e
cmp byte [esp + 0x1b], 0
mov ebp, dword [esp + 0x138]
je 0x408a8a
jmp 0x408893
cmp ax, word [0x4ea340]
jae 0x408a83
mov ecx, eax
mov eax, dword [0x4ec67c]
mov ax, word [eax + ecx*2]
mov word [edi + 4], ax
mov ecx, dword [esp + 0x134]
mov ebp, dword [esp + 0x138]
mov eax, dword [esp + 0x24]
mov edx, 0x7fff
cmp ax, dx
je 0x40888b
mov ebp, dword [esp + 0x24]
mov al, byte [edi + 0xc]
lea esi, [edi + 0xc]
test al, 8
je 0x408ab7
test cl, cl
je 0x408ab7
and al, 0xf7
mov byte [esp + 0x12], 1
mov byte [esi], al
mov eax, ebp
mov ebp, dword [esp + 0x138]
and eax, 0x7fff
cmp ax, word [0x4ea340]
jae 0x408c03
cmp dword [esp + 0x34], 0
jne 0x408c03
push dword [esp + 0x38]
lea eax, [esp + 0x16]
mov dl, cl
push eax
push esi
push ebp
lea ecx, [esp + 0x3c]
call fcn.0040ce10
add esp, 0x10
mov dword [esp + 0x34], eax
test eax, eax
jne 0x408bfd
mov eax, dword [esp + 0x38]
cmp word [eax], 0x69
je 0x408541
mov eax, dword [esp + 0x134]
test al, al
je 0x408bb2
cmp byte [edi + 0x11], 0
je 0x408b9e
push 0
push SysReAllocString
push 0x7fff
push dword [esp + 0x20]
push ebp
push eax
jmp 0x40919e
push 0x7fff
push dword [esp + 0x18]
push ebp
push ecx
push dword [esp + 0x30]
jmp 0x407c7b
cmp word [edi + 4], dx
lea ecx, [edi + 4]
je 0x408b7d
mov ebp, dword [esp + 0x138]
lea eax, [esp + 0x12]
push 0
push eax
lea eax, [edi + 0xc]
mov dl, 1
push eax
push ebp
call fcn.0040ce10
add esp, 0x10
cmp byte [esp + 0x12], 0
je 0x408be5
push 0x7fff
push dword [esp + 0x18]
push ebp
push 0
push dword [esp + 0x30]
jmp 0x407c7b
mov ecx, dword [esp + 0x134]
jmp 0x408aa0
push 0x7fff
push dword [esp + 0x18]
push ebp
push eax
push dword [esp + 0x30]
jmp 0x407c7b
lea ecx, [edi + 4]
mov eax, 0x7fff
cmp word [ecx], ax
je 0x408b7d
push 0
lea eax, [esp + 0x16]
mov byte [esp + 0x16], 0
push eax
push esi
push ebp
mov dl, 1
call fcn.0040ce10
add esp, 0x10
cmp byte [esp + 0x12], 0
jne 0x408b7d
and byte [esi], 0xf7
mov byte [edi + 0x11], 1
push 0
push SysReAllocString
push 0x7fff
push dword [esp + 0x20]
push ebp
push 0
jmp 0x40919e
mov ecx, dword [esp + 0x2c]
jmp 0x408c07
mov ecx, dword [esp + 0x24]
and ecx, 0x7fff
test byte [0x4ea1e6], 0xcc
mov dword [esp + 0x24], ecx
je 0x408cea
cmp byte [esp + 0x12], 0
jne 0x408cea
cmp byte [0x4ec671], 0
jne 0x408c42
mov eax, dword [esp + 0x1c]
cmp eax, dword [0x4e9810]
jne 0x408cea
test byte [0x4ea1e6], 0xc0
mov dl, byte [0x4ea1e4]
je 0x408c7e
test dl, 0xc0
jne 0x408c71
cmp cx, word [0x4ea340]
jae 0x408c7e
mov eax, dword [0x4ea330]
movzx ecx, cx
mov eax, dword [eax + ecx*4]
mov al, byte [eax + 0xf]
and al, 0xc0
je 0x408c7a
mov byte [0x4ec670], 1
jmp 0x408cea
mov ecx, dword [esp + 0x24]
cmp byte [0x4ec670], 0
jne 0x408cea
mov al, byte [0x4ea1e6]
test al, 0xc
je 0x408cea
test al, 3
jne 0x408cea
test dl, 0xc
jne 0x408cb4
cmp cx, word [0x4ea340]
jae 0x408cea
mov eax, dword [0x4ea330]
movzx ecx, cx
mov eax, dword [eax + ecx*4]
mov al, byte [eax + 0xf]
and al, 0xc
je 0x408cea
cmp dword [0x4e9814], 0
je 0x408cc6
mov byte [0x4ec670], 1
jmp 0x408cea
movzx eax, word [0x4e8294]
mov ecx, 2
mov dl, byte [0x4e8272]
push 0xffc3d44d
push 0
push 0
push eax
call fcn.004130d0
add esp, 0x10
mov eax, dword [esp + 0x24]
movzx ecx, ax
lea eax, [ecx - 0x7ffa]
cmp eax, 4
ja case.default.0x408d00
jmp dword [eax*4 + 0x4091e8]
cmp byte [0x4ec672], 0
je 0x408541
xor al, al
test byte [0x4ea1e6], 4
je 0x408d26
mov edx, 0xa4
jmp 0x408d38
test byte [0x4ea1e6], 8
movzx edx, al
mov eax, 0xa5
cmovne edx, eax
cmp byte [0x4ec672], 0
mov dword [esp + 0x3c], edx
je 0x408dc5
mov eax, 0x7ffb
cmp word [esp + 0x24], ax
je case.0x408d00.32765
test dl, dl
movzx eax, dl
push 0xffc3d44d
mov ecx, 0x12
cmovne ecx, eax
push 0
push 0
mov dl, cl
mov ecx, 1
push 0
call fcn.004130d0
add esp, 0x10
cmp byte [edi + 8], 0
je 0x408db4
cmp bl, 0x5b
je 0x408db4
cmp bl, 0x5c
je 0x408db4
cmp byte [esp + 0x134], 0
jne 0x408db4
push 0xffc3d44d
push 0
push 0
push 0
mov dl, bl
mov ecx, 1
call fcn.004130d0
add esp, 0x10
mov byte [0x4ec672], 0
mov edx, 0x7fff
jmp 0x40906c
cmp bl, 0xa4
je 0x408dd4
mov byte [esp + 0x1b], 0
cmp bl, 0xa5
jne 0x408dd9
mov byte [esp + 0x1b], 1
cmp bl, 0xa0
je 0x408de7
cmp bl, 0xa1
je 0x408de7
xor cl, cl
jmp 0x408de9
mov cl, 1
mov byte [esp + 0x19], cl
cmp bl, 0xa2
je 0x408dfc
mov byte [esp + 0x13], 0
cmp bl, 0xa3
jne 0x408e01
mov byte [esp + 0x13], 1
xor dl, dl
test byte [0x4ea1e6], 0x10
mov dword [esp + 0x34], edx
je 0x408e14
mov dl, 0xa0
jmp 0x408e37
test byte [0x4ea1e6], 0x20
mov eax, dword [esp + 0x134]
je 0x408e28
mov dl, 0xa1
jmp 0x408e3e
test al, al
jne 0x408e42
test cl, cl
movzx edx, dl
movzx eax, bl
cmovne edx, eax
mov eax, dword [esp + 0x134]
mov dword [esp + 0x34], edx
xor cl, cl
test byte [0x4ea1e6], 1
mov dword [esp + 0x30], ecx
je 0x408e58
mov byte [esp + 0x30], 0xa2
jmp 0x408e7e
test byte [0x4ea1e6], 2
je 0x408e68
mov byte [esp + 0x30], 0xa3
jmp 0x408e7e
test al, al
jne 0x408e7e
cmp byte [esp + 0x13], 0
movzx ecx, cl
movzx eax, bl
cmovne ecx, eax
mov dword [esp + 0x30], ecx
mov byte [esp + 0x13], 0
test dl, dl
je 0x408ea4
push 0xffc3d44d
push 0
push 0
push 0
mov ecx, 1
call fcn.004130d0
add esp, 0x10
mov byte [esp + 0x13], 1
mov eax, dword [esp + 0x30]
test al, al
je 0x408ec6
push 0xffc3d44d
push 0
push 0
push 0
mov dl, al
mov ecx, 1
call fcn.004130d0
add esp, 0x10
cmp byte [esp + 0x1b], 0
je 0x408edb
cmp byte [esp + 0x134], 0
jne 0x408ee3
mov al, bl
jmp 0x408edf
mov eax, dword [esp + 0x3c]
test al, al
jne 0x408efa
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0x12
xor ecx, ecx
call fcn.004130d0
add esp, 0x10
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 9
mov ecx, 2
call fcn.004130d0
add esp, 0x10
cmp byte [esp + 0x13], 0
je 0x408f3b
cmp byte [esp + 0x19], 0
jne 0x408f3b
mov dl, byte [esp + 0x34]
xor ecx, ecx
push 0xffc3d44d
push 0
push 0
push 0
call fcn.004130d0
add esp, 0x10
mov byte [0x4ec672], 1
mov edx, 0x7fff
jmp 0x40906c
cmp byte [0x4ec672], 0
je 0x408541
mov eax, dword [esp + 0x134]
test al, al
jne 0x408f99
cmp bl, 0xa2
je 0x408f78
cmp bl, 0xa3
je 0x408f78
cmp bl, 0xa0
je 0x408f78
cmp bl, 0xa1
jne 0x408f99
push 0xffc3d44d
push 0
push 0
push 0
mov dl, bl
mov ecx, 1
call fcn.004130d0
mov eax, dword [esp + 0x144]
add esp, 0x10
test byte [0x4ea1e6], 0xc
je 0x408fb0
test al, al
je 0x408fc7
cmp bl, 0xa4
je 0x408fb0
cmp bl, 0xa5
jne 0x408fc7
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0x12
xor ecx, ecx
call fcn.004130d0
add esp, 0x10
mov eax, 0x7ffd
cmp word [esp + 0x24], ax
jne 0x409028
test byte [0x4ea1e6], 0x30
jne 0x409028
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0x10
xor ecx, ecx
call fcn.004130d0
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 9
mov ecx, 2
call fcn.004130d0
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0x10
mov ecx, 1
call fcn.004130d0
add esp, 0x30
mov edx, 0x7fff
jmp 0x40906c
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 9
mov ecx, 2
call fcn.004130d0
add esp, 0x10
mov edx, 0x7fff
jmp 0x40906c
mov edx, ecx
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x40], edx
mov eax, dword [ecx + 4]
test eax, eax
je 0x40906c
cmp byte [eax], 5
jb 0x40906c
movzx eax, word [ecx + 0x14]
shl eax, 0x10
or edx, eax
mov dword [esp + 0x40], edx
mov eax, dword [esp + 0x38]
mov ecx, 0x68
mov word [eax], cx
mov ecx, dword [esp + 0x134]
test cl, cl
je 0x409126
cmp byte [esp + 0x1a], 0
je 0x4090e4
cmp byte [edi + 9], 0
je 0x4090e4
mov esi, dword [esp + 0x20]
mov dl, bl
push 0xffc3d44e
push 0
push 0
push esi
mov ecx, 1
call fcn.004130d0
push 0xffc3d44d
push 0
push 0
push esi
mov dl, bl
mov ecx, 2
call fcn.004130d0
mov eax, dword [esp + 0x60]
add esp, 0x20
push 0
push SysReAllocString
push eax
push dword [esp + 0x20]
push ebp
push dword [esp + 0x148]
jmp 0x40919e
cmp byte [edi + 8], 0
je 0x4090fd
cmp byte [edi + 0x11], 0
je 0x409147
push 0
push SysReAllocString
push edx
jmp 0x409198
cmp byte [esp + 0x12], 0
je 0x40918c
mov eax, dword [esp + 0x1c]
push edx
push dword [esp + 0x18]
push ebp
push ecx
push dword [esp + 0x30]
mov ecx, eax
push ebx
push dword [esp + 0x140]
jmp 0x4079ec
mov eax, dword [0x4ea310]
mov byte [edi + 0x10], 1
test eax, eax
je 0x40913d
cmp byte [eax + 8], 0
je 0x40913d
mov byte [eax + 0x12], 2
cmp byte [esp + 0x12], 0
je 0x409157
or byte [esi], 8
push edx
push dword [esp + 0x18]
push ebp
push ecx
push dword [esp + 0x30]
jmp 0x407c7b
cmp bl, 0xa4
je 0x409161
cmp bl, 0xa5
jne 0x409184
push 0xffc3d450
push 0
push 0
push dword [esp + 0x2c]
mov dl, bl
mov ecx, 1
call fcn.004130d0
mov ecx, dword [esp + 0x144]
add esp, 0x10
test cl, cl
jne 0x40918c
mov byte [edi + 0x11], 1
mov eax, dword [esp + 0x40]
push 0
push SysReAllocString
push eax
push dword [esp + 0x20]
push ebp
push ecx
push ecx
push ebx
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x148]
call fcn.00409200
add esp, 0x20
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x110
ret