Function at 0x405200
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x9c
mov eax, dword [ebp + 0x24]
push ebx
mov ebx, dword [ebp + 0x20]
push esi
push edi
mov dword [esp + 0x2c], 0x7fff
cmp eax, 0xffc3d44f
je 0x405237
cmp eax, 0xffc3d44e
je 0x405237
mov byte [esp + 0xe], 0
cmp eax, 0xffc3d44d
jne 0x40523c
mov byte [esp + 0xe], 1
mov ecx, dword [0x4f14e8]
test ecx, ecx
jne 0x405253
lea edi, [esp + 0x38]
mov dword [esp + 0x10], edi
jmp 0x4052f3
mov eax, dword [0x4f14ec]
mov edi, eax
imul edi, edi, 0x70
inc eax
add edi, ecx
mov dword [esp + 0x10], edi
mov dword [0x4f14ec], eax
cmp eax, dword [0x4ec470]
jl 0x40527b
mov dword [0x4f14ec], 0
mov al, byte [ebp + 0x18]
mov byte [edi], al
mov byte [edi + 5], bl
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
sub ecx, dword [0x4f2364]
mov dword [0x4f14f0], eax
mov dword [esp + 0x34], ecx
fild dword [esp + 0x34]
jns 0x4052a6
fadd dword [0x4e58e0]
fdiv qword [0x4e58d8]
mov dword [0x4f2364], eax
fstp dword [edi + 8]
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov esi, eax
test esi, esi
je 0x4052e6
cmp esi, dword [0x4f14f4]
je 0x4052e0
mov eax, dword [0x4f0bd8]
push esi
lea edx, [edi + 0xc]
push edx
push 0x418
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
jmp 0x4052ed
mov byte [edi + 0xc], 0
jmp 0x4052ed
mov dword [edi + 0xc], 0x412f4e
mov dword [0x4f14f4], esi
mov al, byte [ebp + 0x18]
cmp al, 0xe7
jne 0x405330
mov edx, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x14]
movzx eax, word [ecx + 4]
push 0x7fff
push edi
push ebx
push 0xe7
push edx
mov edx, dword [ebp + 0xc]
push edx
mov edx, dword [ebp + 8]
push edx
mov word [edi + 2], ax
mov byte [edi + 4], 0x55
call fcn.00406b20
add esp, 0x1c
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov cx, word [ebp + 0x1c]
add al, 0x64
mov word [edi + 2], cx
cmp al, 3
ja 0x405345
mov dword [ebp + 0x1c], 0
mov edx, dword [0x4f0d0c]
cmp dword [ebp + 8], edx
jne 0x405375
mov bl, byte [ebp + 0x28]
and bl, 1
jne 0x40549f
cmp byte [ebp + 0x20], bl
movzx ecx, byte [ebp + 0x18]
setne al
dec al
and al, 0x80
mov byte [ecx + 0x4f0bf8], al
jmp 0x40549f
mov ebx, dword [ebp + 0x28]
shr ebx, 4
and bl, 1
test dword [ebp + 0x1c], 0x100
jne case.0x4053b5.13
push 0x90
call dword [sym.imp.USER32.dll_GetKeyState]
test al, 1
je case.0x4053b5.13
movzx eax, byte [ebp + 0x18]
add eax, 0xfffffff4
cmp eax, 0x62
ja case.0x4053b5.13
movzx edx, byte [eax + 0x40694c]
jmp dword [edx*4 + 0x40691c]
cmp byte [ebp + 0x20], 0
sete al
mov byte [0x4efaac], al
jmp case.0x4053b5.13
cmp byte [ebp + 0x20], 0
sete cl
mov byte [0x4efaad], cl
jmp case.0x4053b5.13
cmp byte [ebp + 0x20], 0
sete dl
mov byte [0x4efaae], dl
jmp case.0x4053b5.13
cmp byte [ebp + 0x20], 0
sete al
mov byte [0x4efaaf], al
jmp case.0x4053b5.13
cmp byte [ebp + 0x20], 0
sete cl
mov byte [0x4efab0], cl
jmp case.0x4053b5.13
cmp byte [ebp + 0x20], 0
sete dl
mov byte [0x4efab1], dl
jmp case.0x4053b5.13
cmp byte [ebp + 0x20], 0
sete al
mov byte [0x4efab2], al
jmp case.0x4053b5.13
cmp byte [ebp + 0x20], 0
sete cl
mov byte [0x4efab3], cl
jmp case.0x4053b5.13
cmp byte [ebp + 0x20], 0
sete dl
mov byte [0x4efab4], dl
jmp case.0x4053b5.13
cmp byte [ebp + 0x20], 0
sete al
mov byte [0x4efab5], al
jmp case.0x4053b5.13
cmp byte [ebp + 0x20], 0
sete cl
mov byte [0x4efab6], cl
movzx esi, byte [ebp + 0x18]
mov eax, dword [0x4f1510]
lea edx, [esi + esi*4]
cmp byte [eax + edx*4 + 8], 0
jne 0x40549f
test byte [ebp + 0x28], 0x10
jne 0x40549f
mov ecx, dword [ebp + 0x20]
mov al, byte [ebp + 0x18]
push ecx
call fcn.00407e50
add esp, 4
test al, al
je 0x40549f
cmp byte [ebp + 0x20], 0
setne dl
dec dl
and dl, 0x80
mov byte [esi + 0x4f0bf8], dl
cmp byte [esp + 0xe], 0
je 0x4054aa
mov al, 0x69
jmp 0x4054b4
neg bl
sbb bl, bl
and bl, 0x41
lea eax, [ebx + 0x20]
cmp byte [0x4f0cf8], 0
lea ecx, [edi + 4]
mov dword [esp + 0x30], ecx
mov byte [ecx], al
je 0x4054f4
mov al, byte [ebp + 0x18]
cmp al, 0x5b
je 0x4054d1
cmp al, 0x5c
jne 0x4054f4
cmp byte [ebp + 0x20], 0
jne 0x4054f4
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0x18]
push 0
push SysReAllocString
push 0x7fff
push 0
push eax
push ecx
mov ebx, edi
jmp 0x406907
cmp byte [0x4efacb], 0
je 0x4055a8
cmp byte [ebp + 0x18], 0x1b
jne 0x4055a8
cmp byte [ebp + 0x20], 0
jne 0x4055a8
push 0
push str.scp
call fcn.0049be50
add esp, 4
push eax
call dword [sym.imp.USER32.dll_FindWindowA]
test eax, eax
je 0x4055a8
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 0x4055a8
push 0xffc3d44d
push 0
push 0
push 0
push 0x1b
push 0
call fcn.0040fd20
mov dl, byte [0x4f0bd5]
push 0xffc3d44d
shr dl, 3
push 0
and dl, 1
or dl, 0xa4
push 0
movzx eax, dl
push 0
push eax
push 1
call fcn.0040fd20
mov ecx, dword [ebp + 0x1c]
push 0
push SysReAllocString
push 0x7fff
push 0
push ecx
push 0x1b
mov ebx, edi
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp + 8]
call fcn.004069f0
add esp, 0x48
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
movzx eax, word [ebp + 0x1c]
lea edx, [eax + eax*4]
mov eax, dword [0x4f1514]
mov cl, byte [eax + edx*4 + 0x13]
lea eax, [eax + edx*4]
mov edx, dword [0x4f0d08]
mov byte [esp + 0x23], cl
cmp dword [ebp + 8], edx
jne 0x4055d6
test cl, cl
je 0x4055d6
mov esi, eax
mov dword [esp + 0x1c], eax
jmp 0x4055e9
movzx eax, byte [ebp + 0x18]
lea ecx, [eax + eax*4]
mov eax, dword [0x4f1510]
lea esi, [eax + ecx*4]
mov dword [esp + 0x1c], esi
cmp byte [esp + 0xe], 0
je 0x405648
cmp dword [ebp + 0x24], 0xffc3d44e
jne 0x405619
cmp byte [ebp + 0x20], 0
je 0x405619
cmp dword [0x4efad0], esi
jne 0x405619
mov byte [esi + 0xd], 0
mov byte [esi + 0x10], 0
mov dword [0x4efad0], 0
mov ecx, dword [ebp + 0x20]
push 0x7fff
push edi
push ecx
mov edx, dword [ebp + 0x18]
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
push edx
mov edx, dword [ebp + 8]
push eax
push ecx
push edx
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0x14]
call fcn.00406b20
add esp, 0x1c
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [ebp + 0x20], 0
jne 0x40565b
mov eax, 0x7fff
mov byte [esi + 0x11], 0
mov word [esi + 4], ax
mov ebx, dword [ebp + 8]
cmp ebx, dword [0x4f0d0c]
jne 0x405715
mov al, byte [ebp + 0x18]
test al, al
jne 0x40569b
mov ecx, dword [ebp + 0x20]
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
push 0x7fff
push edi
push ecx
mov ecx, dword [ebp + 0x14]
push 0
push edx
push eax
mov eax, dword [ebp + 0x1c]
push ebx
call fcn.00406b20
add esp, 0x1c
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp al, 1
je 0x4056a3
cmp al, 2
jne 0x405715
cmp dword [0x4f0d68], 0
jne 0x4056d7
push 0
push str.scpm
call fcn.0049be50
add esp, 4
push eax
call dword [sym.imp.USER32.dll_FindWindowA]
test eax, eax
je 0x40570f
push 0
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
cmp eax, dword [0x4f1c80]
jne 0x40570f
mov eax, dword [ebp + 0x20]
push 0x7fff
test al, al
sete cl
push edi
mov byte [esi + 0x10], 0
mov byte [esi + 0xd], cl
push eax
mov edx, dword [ebp + 0x18]
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
push edx
push eax
push ecx
push ebx
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0x14]
call fcn.00406b20
add esp, 0x1c
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [0x4f0d08]
mov eax, dword [0x4efad0]
mov ecx, dword [0x4f1510]
test eax, eax
je 0x405752
cmp eax, esi
je 0x405752
cmp byte [ebp + 0x20], 0
jne 0x405752
cmp ebx, edx
jne 0x40573c
xor eax, eax
cmp byte [esi + 8], al
sete al
jmp 0x405745
mov eax, dword [0x4efad0]
movzx eax, byte [eax + 8]
test eax, eax
je 0x405752
mov eax, dword [0x4efad0]
mov byte [eax + 0x12], 1
cmp byte [esi + 9], 0
jne 0x40576a
cmp byte [esi + 0xa], 0
jne 0x40576a
mov ecx, dword [ebp + 0x20]
push 0x7fff
push edi
push ecx
jmp 0x4056ed
cmp byte [ebp + 0x20], 0
mov dword [esp + 0x18], 0x7fff
mov dword [esp + 0x28], 0
je 0x4057b2
mov al, byte [esi + 0xd]
mov cl, byte [esi + 0x10]
mov byte [esp + 0x22], al
movzx eax, word [esi + 4]
mov byte [esp + 0x17], cl
mov ecx, 0x7fff
mov byte [esi + 0x10], 0
cmp ax, cx
je 0x4057a8
mov dword [esp + 0x18], eax
mov word [esi + 4], cx
mov ecx, dword [0x4f1510]
cmp byte [ebp + 0x20], 0
sete al
mov byte [esi + 0xd], al
mov byte [esp + 0xd], 0
cmp ebx, edx
jne 0x405836
cmp byte [esi + 8], 0
je 0x405853
cmp byte [ecx + 0xcb5], 0
jne 0x4057e1
cmp byte [ecx + 0xcc9], 0
jne 0x4057e1
xor eax, eax
jmp 0x4057e6
mov eax, 1
cmp byte [ecx + 0xcdd], 0
mov byte [ecx + 0x161], al
jne 0x405802
cmp byte [ecx + 0xcf1], 0
jne 0x405802
xor eax, eax
jmp 0x405807
mov eax, 1
cmp byte [ecx + 0xc8d], 0
mov byte [ecx + 0x175], al
jne 0x405829
cmp byte [ecx + 0xca1], 0
jne 0x405829
xor eax, eax
mov byte [ecx + 0x14d], al
jmp 0x405853
mov eax, 1
mov byte [ecx + 0x14d], al
jmp 0x405853
test edx, edx
jne 0x405853
push 1
call fcn.00412200
add esp, 4
mov byte [0x4f0bd6], al
mov byte [0x4f0bd5], al
mov byte [esp + 0xd], 1
mov eax, dword [esi]
test eax, eax
je 0x405863
cmp dword [eax], 7
mov byte [esp + 0xe], 1
je 0x405868
mov byte [esp + 0xe], 0
mov al, byte [esi + 9]
test al, al
je 0x4059ee
cmp byte [ebp + 0x20], 0
jne 0x4059ee
mov ecx, dword [0x4efad0]
test ecx, ecx
je 0x405895
cmp byte [esi + 0xa], 0
je 0x405895
cmp esi, ecx
jne 0x4059ee
cmp al, 1
jne 0x4058be
cmp byte [esp + 0x23], 0
movzx eax, word [ebp + 0x1c]
jne 0x4058a8
movzx eax, byte [ebp + 0x18]
mov ecx, dword [esp + 0x23]
push ecx
push eax
call fcn.0040a6e0
add esp, 8
test al, al
je 0x4058be
mov bl, 1
jmp 0x4058d1
xor bl, bl
cmp esi, dword [0x4efad0]
je 0x4058d1
mov dword [0x4efad0], esi
mov byte [esi + 0x12], bl
cmp byte [esi + 0xa], 0
je 0x405984
cmp byte [esp + 0xd], 0
jne 0x4058f1
push 1
mov byte [esp + 0x11], 1
call fcn.00412200
add esp, 4
mov al, byte [esi + 8]
mov cl, byte [0x4f0bd6]
test al, al
je 0x405902
not al
and cl, al
test cl, cl
jne 0x405910
test bl, bl
jne 0x405910
test byte [esi + 0xc], 1
je 0x405984
mov edx, dword [0x4f0d08]
cmp dword [ebp + 8], edx
jne 0x40593a
cmp byte [esp + 0x23], 0
je 0x40593a
movzx eax, word [ebp + 0x1c]
mov edx, dword [0x4f1508]
movzx ecx, cl
shl ecx, 9
add ecx, eax
movzx ecx, word [edx + ecx*2]
jmp 0x405950
mov edx, dword [0x4f1504]
movzx eax, cl
movzx ecx, byte [ebp + 0x18]
shl eax, 8
add eax, ecx
movzx ecx, word [edx + eax*2]
mov dword [esp + 0x18], ecx
test ecx, 0x8000
je 0x405962
mov word [esi + 4], cx
jmp 0x405992
mov edx, dword [0x4ec518]
mov eax, ecx
and eax, 0x7fff
cmp ax, word [edx]
jae 0x405988
mov edx, dword [0x4f150c]
mov ax, word [edx + eax*2]
mov word [esi + 4], ax
jmp 0x405988
mov ecx, dword [esp + 0x18]
mov edx, 0x7fff
cmp cx, dx
jne 0x4059ee
test bl, bl
je 0x4059a1
mov eax, dword [esp + 0x30]
or byte [esi + 0xc], 8
mov byte [eax], 0x23
cmp byte [esi + 8], 0
jne 0x4059d1
test byte [esi + 0xc], 1
jne 0x4059d1
cmp byte [esp + 0xe], 0
jne 0x4059d1
test bl, bl
jne 0x4059d1
push 0
push SysReAllocString
push 0x7fff
mov byte [esi + 0x11], 1
push 0
mov ebx, edi
jmp 0x4068ff
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
push 0x7fff
push edi
push 0
push eax
mov eax, dword [ebp + 8]
push ecx
push edx
push eax
jmp 0x4056fa
cmp byte [esi + 0xa], 0
mov byte [esp + 0xf], 0
je 0x405a67
cmp byte [ebp + 0x20], 0
je 0x405a67
cmp dword [0x4efad0], esi
jne 0x405a18
cmp byte [esp + 0x17], 0
je 0x405a67
mov dword [0x4efad0], 0
cmp byte [esi + 0xb], 0
jne 0x405a62
mov al, byte [esi + 0xc]
test al, 8
je 0x405a2e
xor cl, cl
and al, 0xf7
mov byte [esi + 0xc], al
jmp 0x405a30
mov cl, 1
cmp byte [esp + 0x17], 0
je 0x405619
test cl, cl
je 0x405619
mov ecx, dword [ebp + 0x20]
mov edx, dword [ebp + 0x1c]
mov eax, dword [ebp + 0x18]
push 0
push SysReAllocString
push 0x7fff
push ecx
push edx
push eax
mov ebx, edi
jmp 0x406907
mov byte [esp + 0xf], 1
cmp byte [esi + 9], 0
je 0x405c06
cmp byte [ebp + 0x20], 0
je 0x405c06
cmp dword [0x4efad0], esi
jne 0x405a8d
mov dword [0x4efad0], 0
cmp byte [esi + 0xe], 0
je 0x405aae
push 0xffc3d44d
push 0
push 0
push 0
push 0x12
push 1
mov byte [esi + 0xe], 0
call fcn.0040fd20
add esp, 0x18
cmp byte [esi + 0xf], 0
mov ebx, dword [0x4f1510]
je 0x405adb
push 0xffc3d44d
push 0
push 0
push 0
push 0x10
push 1
mov byte [esi + 0xf], 0
call fcn.0040fd20
mov ebx, dword [0x4f1510]
add esp, 0x18
mov edx, dword [esp + 0x18]
mov eax, 0x7fff
cmp dx, ax
jne 0x405afa
mov al, byte [esi + 0xc]
test al, 8
je 0x405afa
and al, 0xf7
mov byte [esi + 0xc], al
jmp 0x405619
mov cl, byte [esp + 0xe]
test cl, cl
je 0x405b8f
mov al, byte [esi + 0x12]
cmp al, 2
jne 0x405b4e
mov ebx, dword [ebp + 0x1c]
mov esi, dword [ebp + 0x18]
push 0xffc3d44e
push 0
push 0
push ebx
push esi
push 1
call fcn.0040fd20
push 0xffc3d44d
push 0
push 0
push ebx
push esi
push 2
call fcn.0040fd20
mov eax, dword [ebp + 0x20]
push 0
push SysReAllocString
push 0x7fff
push eax
push ebx
push esi
jmp 0x405591
cmp al, 1
je 0x405619
cmp byte [esi + 0xa], 0
jne 0x405bf4
cmp byte [esi + 8], 0
jne 0x405bd5
test byte [esi + 0xc], 1
jne 0x405bd5
test cl, cl
jne 0x405bd5
mov edx, dword [ebp + 0x20]
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0x18]
push 0
push SysReAllocString
push 0x7fff
push edx
push eax
push ecx
mov ebx, edi
jmp 0x406907
cmp byte [esi + 0x12], 0
je 0x405b56
mov eax, 0x7fff
cmp dx, ax
jne 0x405b56
cmp byte [esi + 8], 0
jne 0x405619
test byte [esi + 0xc], 1
mov ecx, dword [ebp + 0x18]
je 0x405bb9
push eax
push edi
jmp 0x40631e
mov edx, dword [ebp + 0x20]
mov eax, dword [ebp + 0x1c]
push 0
push SysReAllocString
push 0x7fff
push edx
push eax
push ecx
mov ebx, edi
jmp 0x406907
push 0x7fff
push edi
mov edx, dword [ebp + 0x20]
push edx
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
push ecx
push edx
push eax
jmp 0x405633
cmp byte [esp + 0x22], 0
jne 0x405c10
cmp byte [esi + 0xb], 0
jne 0x405c10
jmp 0x405619
mov edx, dword [esp + 0x18]
mov ebx, dword [0x4f1510]
cmp byte [esp + 0xd], 0
jne 0x405c35
mov eax, 0x7fff
cmp dx, ax
jne 0x405c35
push 1
call fcn.00412200
mov ebx, dword [0x4f1510]
mov edx, dword [esp + 0x1c]
add esp, 4
cmp dword [0x4efad0], 0
mov byte [esp + 0xd], 0
je 0x405fee
cmp byte [ebp + 0x20], 0
je 0x405c57
cmp byte [esi + 0xb], 0
je 0x405fee
mov ecx, 0x7fff
cmp dx, cx
jne 0x40625f
mov eax, dword [esp + 0x1c]
movzx esi, word [eax + 6]
xor edx, edx
cmp si, cx
je 0x405da8
jmp 0x405c80
mov ecx, dword [0x4f1520]
movzx eax, si
mov eax, dword [ecx + eax*4]
mov cl, byte [eax + 0x11]
test cl, cl
je 0x405c9e
movzx ecx, cl
lea ecx, [ecx + ecx*4]
lea ecx, [ebx + ecx*4]
jmp 0x405cae
movzx ecx, word [eax + 0xa]
mov edi, dword [0x4f1514]
lea ecx, [ecx + ecx*4]
lea ecx, [edi + ecx*4]
cmp byte [ecx + 0xd], 0
je 0x405cde
cmp byte [eax + 0x16], 0
je 0x405cd2
cmp byte [ebp + 0x20], 0
jne 0x405cee
mov cx, word [eax + 4]
mov esi, dword [esp + 0x1c]
mov word [esi + 4], cx
test edx, edx
jne 0x405cf8
jmp 0x405cde
cmp byte [ebp + 0x20], 0
jne 0x405cde
test edx, edx
jne 0x405cde
mov edx, eax
movzx esi, word [eax + 0xc]
mov eax, 0x7fff
cmp si, ax
jne 0x405c80
jmp 0x405cf0
mov edx, eax
test edx, edx
je 0x405da8
movzx eax, byte [edx + 0x11]
cmp eax, 0x12
ja case.0x405d0c.1
movzx ecx, byte [eax + 0x4069c4]
jmp dword [ecx*4 + 0x4069b0]
xor eax, eax
cmp byte [ebx + 0xca1], al
setne al
lea eax, [eax + eax*4 + 0x320]
lea ecx, [ebx + eax*4]
mov dword [0x4efad0], ecx
jmp 0x405d87
xor eax, eax
cmp byte [ebx + 0xcc9], al
setne al
lea eax, [eax + eax*4 + 0x32a]
lea ecx, [ebx + eax*4]
mov dword [0x4efad0], ecx
jmp 0x405d87
xor eax, eax
cmp byte [ebx + 0xcf1], al
setne al
lea eax, [eax + eax*4 + 0x334]
lea ecx, [ebx + eax*4]
mov dword [0x4efad0], ecx
jmp 0x405d87
movzx eax, word [edx + 0xa]
mov ecx, dword [0x4f1514]
lea eax, [eax + eax*4]
lea eax, [ecx + eax*4]
jmp 0x405d82
lea ecx, [eax + eax*4]
lea eax, [ebx + ecx*4]
mov dword [0x4efad0], eax
movzx eax, word [edx + 6]
test ax, ax
je 0x405e1b
mov ecx, eax
mov dword [esp + 0x18], ecx
mov eax, dword [0x4efad0]
movzx esi, word [esp + 0x18]
mov byte [eax + 0x12], 2
mov ecx, 0x7ffe
cmp si, cx
je 0x405dc0
mov edx, 0x7ffd
cmp si, dx
jne 0x405fea
cmp byte [ebp + 0x20], 0
jne 0x405dce
mov eax, dword [esp + 0x1c]
mov byte [eax + 0x10], 1
test byte [0x4f0bd5], 0xc
jne 0x405dee
push 0xffc3d44d
push 0
push 0
push 0
push 0x12
push 0
call fcn.0040fd20
add esp, 0x18
mov ebx, dword [ebp + 0x18]
cmp bl, 0xa2
je 0x405dfb
cmp bl, 0xa3
jne 0x405e62
cmp byte [ebp + 0x20], 0
jne 0x405e62
mov edi, dword [ebp + 0x1c]
push 0xffc3d44d
push 0
push 0
push edi
push ebx
push 1
call fcn.0040fd20
add esp, 0x18
jmp 0x405e65
mov ebx, dword [ebp + 0x20]
movzx edx, word [edx + 4]
mov ecx, dword [esp + 0x1c]
mov esi, dword [esp + 0x30]
mov edi, dword [ebp + 0x24]
lea eax, [esp + 0x18]
push ebx
push eax
add ecx, 0xc
lea eax, [esp + 0x15]
mov dword [esp + 0x20], edx
call fcn.0040a8f0
add esp, 8
mov dword [esp + 0x28], eax
test eax, eax
jne 0x405d9a
mov ecx, dword [esp + 0x10]
push 0x7fff
push ecx
push ebx
jmp 0x405623
mov edi, dword [ebp + 0x1c]
mov ecx, dword [0x4efad0]
mov edx, 0x7ffd
mov byte [ecx + 0xe], 1
cmp si, dx
jne 0x405ea4
test byte [0x4f0bd5], 0x30
jne 0x405e99
push 0xffc3d44d
push 0
push 0
push 0
push 0x10
push 0
call fcn.0040fd20
add esp, 0x18
mov eax, dword [0x4efad0]
mov byte [eax + 0xf], 1
jmp 0x405f19
mov ecx, 0x7ffe
cmp si, cx
jne 0x405f19
cmp bl, 0xa0
je 0x405eb8
cmp bl, 0xa1
jne 0x405ed3
cmp byte [ebp + 0x20], 0
jne 0x405ed3
push 0xffc3d44d
push 0
push 0
push edi
push ebx
push 1
call fcn.0040fd20
add esp, 0x18
test byte [0x4f0bd5], 0x10
je 0x405ef6
push 0xffc3d44d
push 0
push 0
push 0
push 0xa0
push 1
call fcn.0040fd20
add esp, 0x18
test byte [0x4f0bd5], 0x20
je 0x405f19
push 0xffc3d44d
push 0
push 0
push 0
push 0xa1
push 1
call fcn.0040fd20
add esp, 0x18
test byte [0x4f0bd5], 1
je 0x405f3c
push 0xffc3d44d
push 0
push 0
push 0
push 0xa2
push 1
call fcn.0040fd20
add esp, 0x18
test byte [0x4f0bd5], 2
je 0x405f5f
push 0xffc3d44d
push 0
push 0
push 0
push 0xa3
push 1
call fcn.0040fd20
add esp, 0x18
push 0xffc3d44d
push 0
push 0
push 0
push 9
push 2
call fcn.0040fd20
mov edx, 0x7ffd
add esp, 0x18
cmp si, dx
jne 0x405fbb
mov eax, dword [0x4efad0]
cmp byte [eax + 0xf], 0
je 0x405fbb
cmp bl, 0x60
jb 0x405f95
cmp bl, 0x69
jbe 0x405f9a
cmp bl, 0x6e
jne 0x405fbb
push 0xffc3d44d
push 0
push 0
push 0
push 0x10
push 1
call fcn.0040fd20
mov ecx, dword [0x4efad0]
add esp, 0x18
mov byte [ecx + 0xf], 0
cmp byte [ebp + 0x20], 0
mov edx, dword [esp + 0x30]
mov byte [edx], 0x68
jne 0x405fd0
mov eax, dword [esp + 0x1c]
mov byte [eax + 0x11], 1
mov ecx, dword [ebp + 0x20]
mov ebx, dword [esp + 0x10]
push 0
push SysReAllocString
push 0x7fff
push ecx
push edi
jmp 0x406903
mov edx, dword [esp + 0x18]
mov eax, 0x7fff
cmp dx, ax
jne 0x40625f
mov ecx, dword [esp + 0x1c]
mov cl, byte [ecx + 8]
mov al, byte [0x4f0bd6]
test cl, cl
je 0x406010
not cl
and al, cl
mov esi, dword [ebp + 8]
cmp esi, dword [0x4f0d08]
jne 0x40603d
cmp byte [esp + 0x23], 0
je 0x40603d
movzx ecx, word [ebp + 0x1c]
movzx edx, al
shl edx, 9
add edx, ecx
mov ecx, dword [0x4f1508]
movzx ecx, word [ecx + edx*2]
mov dl, byte [ebp + 0x18]
jmp 0x406055
mov dl, byte [ebp + 0x18]
movzx ecx, al
movzx edi, dl
shl ecx, 8
add ecx, edi
mov edi, dword [0x4f1504]
movzx ecx, word [edi + ecx*2]
mov edi, 0x7fff
mov dword [esp + 0x18], ecx
cmp cx, di
jne 0x4060cf
cmp byte [0x4efacb], 0
je 0x4060cf
cmp dl, 9
je 0x4060cf
and al, 0xf3
cmp esi, dword [0x4f0d08]
jne 0x406099
cmp byte [esp + 0x23], 0
je 0x406099
movzx edx, al
movzx eax, word [ebp + 0x1c]
shl edx, 9
add edx, eax
mov eax, dword [0x4f1508]
movzx ecx, word [eax + edx*2]
jmp 0x4060ad
movzx ecx, al
mov eax, dword [0x4f1504]
movzx edx, dl
shl ecx, 8
add ecx, edx
movzx ecx, word [eax + ecx*2]
mov eax, ecx
and eax, 0x7fff
mov edx, 0x7ff9
mov dword [esp + 0x18], ecx
cmp ax, dx
jbe 0x4060c9
mov edx, edi
cmp ax, dx
jb 0x4060cf
mov ecx, edi
mov dword [esp + 0x18], ecx
test ecx, 0x8000
je 0x40610f
cmp byte [ebp + 0x20], 0
jne 0x4061ab
mov eax, dword [esp + 0x1c]
mov word [eax + 4], cx
mov eax, dword [esp + 0x1c]
add eax, 4
mov ecx, 0x7fff
cmp word [eax], cx
jne 0x40620f
mov edx, dword [esp + 0x10]
push 0x7fff
push edx
push 0
jmp 0x405bdf
mov edx, edi
cmp cx, dx
je 0x4061b9
mov edx, dword [0x4ec518]
mov eax, ecx
and eax, 0x7fff
cmp byte [ebp + 0x20], 0
je 0x40618e
cmp ax, word [edx]
jae 0x406185
mov edx, dword [0x4f150c]
mov ebx, eax
add ebx, ebx
mov eax, edi
cmp word [ebx + edx], ax
je 0x406185
cmp byte [esp + 0xf], 0
jne 0x406176
mov eax, dword [ebp + 0x20]
mov ecx, dword [esp + 0x1c]
mov esi, dword [esp + 0x30]
mov edi, dword [ebp + 0x24]
push eax
lea edx, [esp + 0x1c]
add ecx, 0xc
push edx
lea eax, [esp + 0x15]
call fcn.0040a8f0
add esp, 8
mov dword [esp + 0x28], eax
test eax, eax
jne 0x4061a7
mov eax, dword [0x4f150c]
movzx ecx, word [ebx + eax]
mov dword [esp + 0x18], ecx
jmp 0x4061ab
cmp byte [esp + 0xf], 0
jne 0x4061b9
jmp 0x4061ab
cmp ax, word [edx]
jae 0x4061ab
mov edx, dword [0x4f150c]
mov ax, word [edx + eax*2]
mov edx, dword [esp + 0x1c]
mov word [edx + 4], ax
jmp 0x4061ab
mov ecx, dword [esp + 0x18]
mov eax, 0x7fff
cmp cx, ax
jne 0x40625f
mov ecx, dword [ebp + 0x20]
test cl, cl
je 0x4060e9
mov eax, dword [esp + 0x1c]
cmp byte [eax + 8], 0
jne 0x4061ff
test byte [eax + 0xc], 1
jne 0x4061ff
cmp byte [eax + 9], 0
je 0x4061ff
cmp byte [esp + 0xe], 0
jne 0x4061ff
mov edx, dword [ebp + 0x1c]
mov eax, dword [ebp + 0x18]
mov ebx, dword [esp + 0x10]
push 0
push SysReAllocString
push 0x7fff
push ecx
push edx
push eax
jmp 0x406907
mov edx, dword [esp + 0x10]
push 0x7fff
push edx
push ecx
jmp 0x405bdf
mov ecx, dword [esp + 0x1c]
push 1
push eax
add ecx, 0xc
xor esi, esi
lea eax, [esp + 0x15]
xor edi, edi
call fcn.0040a8f0
add esp, 8
cmp byte [esp + 0xd], 0
je 0x406240
mov ecx, dword [esp + 0x10]
push 0x7fff
push ecx
push edi
jmp 0x405623
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0x18]
mov ebx, dword [esp + 0x10]
push 0
push SysReAllocString
push 0x7fff
push 0
push eax
push ecx
jmp 0x406907
mov ebx, dword [esp + 0x1c]
mov al, byte [ebx + 0xc]
add ebx, 0xc
mov dword [esp + 0x34], ebx
test al, 8
je 0x406280
cmp byte [ebp + 0x20], 0
je 0x406280
and al, 0xf7
mov byte [esp + 0xd], 1
mov byte [ebx], al
mov edx, dword [esp + 0x18]
mov eax, dword [0x4ec518]
and edx, 0x7fff
cmp dx, word [eax]
jae 0x4063b3
cmp dword [esp + 0x28], 0
jne 0x4063b3
mov ecx, dword [ebp + 0x20]
mov esi, dword [esp + 0x30]
mov edi, dword [ebp + 0x24]
push ecx
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x15]
mov ecx, ebx
call fcn.0040a8f0
add esp, 8
mov dword [esp + 0x28], eax
test eax, eax
jne 0x4063b3
mov eax, esi
cmp byte [eax], 0x69
jne 0x4062e3
mov ecx, dword [esp + 0x10]
push 0x7fff
push ecx
jmp 0x405bdb
cmp byte [ebp + 0x20], 0
je 0x406334
mov ecx, dword [esp + 0x1c]
cmp byte [ecx + 0x11], 0
mov ecx, dword [ebp + 0x18]
je 0x406314
mov edx, dword [ebp + 0x20]
mov eax, dword [ebp + 0x1c]
mov ebx, dword [esp + 0x10]
push 0
push SysReAllocString
push 0x7fff
push edx
push eax
push ecx
jmp 0x406907
mov edx, dword [esp + 0x10]
push 0x7fff
push edx
mov eax, dword [ebp + 0x20]
mov edx, dword [ebp + 0x10]
push eax
mov eax, dword [ebp + 0xc]
push ecx
mov ecx, dword [ebp + 8]
push edx
push eax
push ecx
jmp 0x405633
mov eax, dword [esp + 0x1c]
add eax, 4
mov edx, 0x7fff
cmp word [eax], dx
jne 0x406362
mov eax, dword [esp + 0x10]
push edx
push eax
push 0
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
push ecx
mov ecx, dword [ebp + 8]
push edx
push eax
push ecx
jmp 0x405633
push 1
push eax
xor esi, esi
lea eax, [esp + 0x15]
mov ecx, ebx
xor edi, edi
mov byte [esp + 0x15], 0
call fcn.0040a8f0
add esp, 8
cmp byte [esp + 0xd], 0
jne 0x4060fe
mov eax, dword [esp + 0x34]
mov edx, dword [ebp + 0x1c]
and byte [eax], 0xf7
mov ecx, dword [esp + 0x1c]
mov eax, dword [ebp + 0x18]
mov ebx, dword [esp + 0x10]
push edi
push SysReAllocString
push 0x7fff
push edi
push edx
mov byte [ecx + 0x11], 1
push eax
jmp 0x406907
mov esi, dword [esp + 0x18]
mov dl, byte [0x4f0bd5]
and esi, 0x7fff
test dl, 0xcc
je 0x406476
cmp byte [esp + 0xd], 0
jne 0x406476
cmp byte [0x4eface], 0
jne 0x4063ef
mov ecx, dword [ebp + 8]
cmp ecx, dword [0x4f0d0c]
jne 0x406476
mov bl, byte [0x4f0bd7]
test dl, 0xc0
je 0x406421
test bl, 0xc0
jne 0x406418
push 0xc0
mov eax, esi
call fcn.0040ab50
mov dl, byte [0x4f0bd5]
add esp, 4
test al, al
je 0x406421
mov byte [0x4efacf], 1
jmp 0x406476
cmp byte [0x4efacf], 0
jne 0x406476
test dl, 0xc
je 0x406476
test dl, 3
jne 0x406476
test bl, 0xc
jne 0x40644f
push 0xc
mov eax, esi
call fcn.0040ab50
mov dl, byte [0x4f0bd5]
add esp, 4
test al, al
je 0x406476
cmp dword [0x4f0d08], 0
je 0x406461
mov byte [0x4efacf], 1
jmp 0x406476
push 2
mov eax, 0xffc3d44d
call fcn.00410370
mov dl, byte [0x4f0bd5]
add esp, 4
mov eax, esi
lea ecx, [eax - 0x7ffa]
cmp ecx, 4
ja case.default.0x406487
jmp dword [ecx*4 + 0x4069d8]
cmp byte [0x4efacb], 0
jne case.0x406487.32763
mov edx, dword [esp + 0x10]
mov eax, dword [ebp + 0x20]
push 0x7fff
push edx
push eax
jmp 0x40634d
xor al, al
mov byte [esp + 0xf], al
test dl, 4
je 0x4064b9
mov al, 0xa4
jmp 0x4064c0
test dl, 8
je 0x4064c4
mov al, 0xa5
mov byte [esp + 0xf], al
cmp byte [0x4efacb], 0
je 0x40653a
mov ecx, 0x7ffb
cmp si, cx
je case.0x406487.32765
test al, al
movzx eax, al
jne 0x4064e7
mov eax, 0x12
push 0xffc3d44d
push 0
push 0
push 0
push eax
push 1
call fcn.0040fd20
mov edx, dword [esp + 0x34]
add esp, 0x18
cmp byte [edx + 8], 0
je 0x40652e
mov eax, dword [ebp + 0x18]
cmp al, 0x5b
je 0x40652e
cmp al, 0x5c
je 0x40652e
cmp byte [ebp + 0x20], 0
jne 0x40652e
push 0xffc3d44d
push 0
push 0
push 0
push eax
push 1
call fcn.0040fd20
add esp, 0x18
mov byte [0x4efacb], 0
jmp 0x40678f
mov cl, byte [ebp + 0x18]
cmp cl, 0xa4
je 0x40654c
mov byte [esp + 0x27], 0
cmp cl, 0xa5
jne 0x406551
mov byte [esp + 0x27], 1
cmp cl, 0xa0
je 0x40655f
cmp cl, 0xa1
je 0x40655f
xor bl, bl
jmp 0x406561
mov bl, 1
mov byte [esp + 0x22], bl
cmp cl, 0xa2
je 0x406574
mov byte [esp + 0x17], 0
cmp cl, 0xa3
jne 0x406579
mov byte [esp + 0x17], 1
xor al, al
mov byte [esp + 0x28], al
test dl, 0x10
je 0x40658c
mov al, 0xa0
mov byte [esp + 0x28], al
jmp 0x4065af
test dl, 0x20
je 0x406599
mov al, 0xa1
mov byte [esp + 0x28], al
jmp 0x4065af
cmp byte [ebp + 0x20], 0
jne 0x4065a9
test bl, bl
je 0x4065a9
mov al, cl
mov byte [esp + 0x28], al
mov dl, byte [0x4f0bd5]
mov byte [esp + 0x23], 0
test dl, 1
je 0x4065c0
mov byte [esp + 0x23], 0xa2
jmp 0x4065dd
test dl, 2
je 0x4065cc
mov byte [esp + 0x23], 0xa3
jmp 0x4065dd
cmp byte [ebp + 0x20], 0
jne 0x4065dd
cmp byte [esp + 0x17], 0
je 0x4065dd
mov byte [esp + 0x23], cl
mov esi, dword [esp + 0x28]
xor bl, bl
test al, al
je 0x406602
push 0xffc3d44d
push 0
push 0
push 0
push esi
push 1
call fcn.0040fd20
mov cl, byte [ebp + 0x18]
add esp, 0x18
mov bl, 1
cmp byte [esp + 0x23], 0
je 0x406626
mov eax, dword [esp + 0x23]
push 0xffc3d44d
push 0
push 0
push 0
push eax
push 1
call fcn.0040fd20
mov cl, byte [ebp + 0x18]
add esp, 0x18
cmp byte [esp + 0x27], 0
je 0x406635
cmp byte [ebp + 0x20], 0
jne 0x40663d
jmp 0x406639
mov cl, byte [esp + 0xf]
test cl, cl
jne 0x406654
push 0xffc3d44d
push 0
push 0
push 0
push 0x12
push 0
call fcn.0040fd20
add esp, 0x18
push 0xffc3d44d
push 0
push 0
push 0
push 9
push 2
call fcn.0040fd20
add esp, 0x18
test bl, bl
je 0x40668c
cmp byte [esp + 0x22], 0
jne 0x40668c
push 0xffc3d44d
push 0
push 0
push 0
push esi
push 0
call fcn.0040fd20
add esp, 0x18
mov byte [0x4efacb], 1
jmp 0x40678f
cmp byte [0x4efacb], 0
je 0x4062d4
cmp byte [ebp + 0x20], 0
mov al, byte [ebp + 0x18]
jne 0x4066e0
cmp al, 0xa2
je 0x4066be
cmp al, 0xa3
je 0x4066be
cmp al, 0xa0
je 0x4066be
cmp al, 0xa1
jne 0x4066e0
mov ecx, dword [ebp + 0x18]
push 0xffc3d44d
push 0
push 0
push 0
push ecx
push 1
call fcn.0040fd20
mov dl, byte [0x4f0bd5]
mov al, byte [ebp + 0x18]
add esp, 0x18
test dl, 0xc
je 0x4066f3
cmp byte [ebp + 0x20], 0
je 0x40670a
cmp al, 0xa4
je 0x4066f3
cmp al, 0xa5
jne 0x40670a
push 0xffc3d44d
push 0
push 0
push 0
push 0x12
push 0
call fcn.0040fd20
add esp, 0x18
mov edx, 0x7ffd
xor bl, bl
cmp si, dx
jne 0x406738
test byte [0x4f0bd5], 0x30
jne 0x406738
push 0xffc3d44d
push 0
push 0
push 0
push 0x10
push 0
call fcn.0040fd20
add esp, 0x18
mov bl, 1
push 0xffc3d44d
push 0
push 0
push 0
push 9
push 2
call fcn.0040fd20
add esp, 0x18
test bl, bl
je 0x40678f
push 0xffc3d44d
push 0
push 0
push 0
push 0x10
push 1
call fcn.0040fd20
add esp, 0x18
jmp 0x40678f
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x28]
mov eax, dword [eax + 4]
test eax, eax
je 0x40678f
cmp byte [eax], 5
jb 0x40678f
mov ecx, dword [esp + 0x28]
movzx edx, word [ecx + 0x14]
shl edx, 0x10
or dword [esp + 0x2c], edx
cmp byte [esp + 0xe], 0
mov eax, dword [esp + 0x30]
mov ebx, dword [ebp + 0x20]
mov esi, dword [esp + 0x1c]
mov byte [eax], 0x68
je 0x4067f6
test bl, bl
je 0x40688b
cmp byte [esi + 9], 0
je 0x4067f6
mov esi, dword [ebp + 0x1c]
mov edi, dword [ebp + 0x18]
push 0xffc3d44e
push 0
push 0
push esi
push edi
push 1
call fcn.0040fd20
push 0xffc3d44d
push 0
push 0
push esi
push edi
push 2
call fcn.0040fd20
mov ecx, dword [esp + 0x5c]
push 0
push SysReAllocString
push ecx
mov edx, ebx
mov ebx, dword [esp + 0x4c]
push edx
push esi
push edi
jmp 0x405593
test bl, bl
je 0x40688b
cmp byte [esi + 8], 0
je 0x40683b
cmp byte [esi + 0x11], 0
je 0x40682b
mov eax, dword [esp + 0x2c]
mov ecx, dword [ebp + 0x20]
mov edx, dword [ebp + 0x1c]
mov ebx, dword [esp + 0x10]
push 0
push SysReAllocString
push eax
mov eax, dword [ebp + 0x18]
push ecx
push edx
push eax
jmp 0x406907
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x10]
push ecx
push edx
push ebx
jmp 0x405bdf
cmp byte [esp + 0xd], 0
je 0x4068e3
mov eax, dword [ebp + 8]
cmp eax, dword [0x4f0d0c]
jne 0x40686e
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x10]
push ecx
mov ecx, dword [ebp + 0x18]
push edx
mov edx, dword [ebp + 0x10]
push ebx
push ecx
mov ecx, dword [ebp + 0xc]
push edx
push ecx
push eax
jmp 0x405633
mov edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x10]
push edx
mov edx, dword [ebp + 0x18]
push ecx
mov ecx, dword [ebp + 0x10]
push ebx
push edx
mov edx, dword [ebp + 0xc]
push ecx
push edx
push eax
jmp 0x405633
mov eax, dword [0x4efad0]
mov byte [esi + 0x10], 1
test eax, eax
je 0x4068a2
cmp byte [eax + 8], 0
je 0x4068a2
mov byte [eax + 0x12], 2
cmp byte [esp + 0xd], 0
je 0x4068c0
mov eax, dword [esp + 0x34]
or byte [eax], 8
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x10]
push eax
push ecx
push ebx
jmp 0x405623
mov eax, dword [ebp + 0x18]
cmp al, 0xa4
je 0x4068cb
cmp al, 0xa5
jne 0x4068e3
mov ecx, dword [ebp + 0x1c]
push 0xffc3d450
push 0
push 0
push ecx
push eax
push 1
call fcn.0040fd20
add esp, 0x18
test bl, bl
jne 0x4068eb
mov byte [esi + 0x11], 1
mov edx, dword [esp + 0x2c]
mov eax, dword [ebp + 0x20]
mov ebx, dword [esp + 0x10]
push 0
push SysReAllocString
push edx
push eax
mov ecx, dword [ebp + 0x1c]
push ecx
mov edx, dword [ebp + 0x18]
push edx
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp + 8]
call fcn.004069f0
add esp, 0x18
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret