Function at 0x406960
Capabilities:
Hide graphical window

Disassembly:
sub esp, 0x20c
push ebx
push ebp
mov ebp, dword [esp + 0x224]
push esi
push edi
mov eax, dword [ebp]
cmp eax, 3
jne 0x4069d3
mov eax, dword [ebp + 8]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea ecx, [esp + 0x14]
push eax
push ecx
call esi
lea edx, [esp + 0x14]
push edx
push 0x412720
call esi
lea eax, [esp + 0x14]
push eax
push 0x413000
call esi
mov edx, dword [esp + 0x220]
lea ecx, [esp + 0x14]
push ecx
push edx
call dword [sym.imp.USER32.dll_SetWindowTextW]
mov eax, dword [ebp + 8]
mov ecx, dword [0x412008]
push eax
push ecx
call dword [0x4123a0]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20c
ret
cmp eax, 1
je 0x4069e1
cmp eax, 2
jne 0x4071a6
mov eax, dword [0x412010]
test eax, eax
je 0x406a08
mov ecx, dword [0x412014]
mov edx, dword [ebp + 4]
cmp ecx, edx
jne 0x406a06
mov edi, dword [ebp + 8]
mov esi, eax
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x4071a6
test eax, eax
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
je 0x406a23
push eax
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
mov dword [0x412010], eax
cmp dword [ebp], 1
jne 0x406a60
mov eax, dword [ebp + 4]
mov dword [0x412014], eax
mov ecx, dword [ebp + 4]
push ecx
push 8
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [0x412010], eax
mov ecx, dword [ebp + 4]
mov esi, dword [ebp + 8]
mov edx, ecx
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [0x412010]
test eax, eax
je 0x406a79
mov ecx, dword [eax + 4]
test ch, 0x20
je 0x406a79
test dword [eax + 8], 0x1008
jne 0x4071a6
mov ecx, dword [0x4123c0]
mov edi, dword [sym.imp.USER32.dll_ShowWindow]
test eax, eax
mov dword [esp + 0x10], ecx
je 0x406bb1
call fcn.004063b0
test eax, eax
je 0x406ab1
call fcn.00406310
test eax, eax
je 0x406ab1
call fcn.00406150
cmp eax, 1
jne 0x406bb1
mov eax, dword [0x413238]
test eax, eax
mov eax, dword [0x412010]
jne 0x406ad5
mov ecx, dword [eax + 0x40]
test ecx, ecx
jne 0x406ad5
test dword [eax + 8], 0x10000
je 0x406ad5
test byte [eax + 0x44], 1
jne 0x406aec
test dword [eax + 4], 0xbfe5e000
je 0x406bb1
test byte [eax + 8], 8
je 0x406bb1
mov edx, dword [0x4133d0]
push edx
call dword [sym.imp.USER32.dll_IsWindowVisible]
test eax, eax
jne 0x406b23
mov eax, dword [0x4133d0]
push 5
push eax
call edi
mov ecx, dword [0x412010]
mov edx, dword [ecx + 4]
and edx, 0xbfe5e000
neg edx
sbb edx, edx
and edx, 3
mov dword [0x412040], edx
mov eax, dword [0x4133d0]
push eax
call dword [sym.imp.USER32.dll_IsIconic]
test eax, eax
je 0x406b58
mov ecx, dword [0x4133d0]
push 9
push ecx
call edi
mov edx, dword [0x412010]
mov eax, dword [edx + 4]
and eax, 0xbfe5e000
neg eax
sbb eax, eax
and eax, 3
mov dword [0x412040], eax
mov ecx, dword [0x4133d0]
push ecx
call dword [sym.imp.USER32.dll_SetForegroundWindow]
mov edx, dword [0x4133d0]
push 0
push 0
push edx
call dword [sym.imp.USER32.dll_InvalidateRect]
mov eax, dword [0x4133d0]
push 5
push eax
call edi
mov eax, dword [0x412008]
test eax, eax
je 0x406b96
mov ecx, dword [0x412ff4]
test ecx, ecx
je 0x406b96
push eax
call ecx
mov ecx, dword [0x412010]
mov eax, dword [0x4133d0]
push eax
mov edx, dword [ecx + 4]
mov dword [0x412088], edx
call dword [sym.imp.USER32.dll_SetActiveWindow]
mov eax, dword [ebp]
mov edx, dword [ebp + 8]
mov esi, dword [esp + 0x10]
xor ecx, ecx
cmp eax, 2
mov eax, dword [0x412db4]
sete cl
push ecx
push 0x4123c0
push edx
push esi
push eax
call dword [0x413230]
mov eax, dword [0x412028]
mov edi, dword [esp + 0x220]
mov ebx, dword [sym.imp.USER32.dll_SetTimer]
test eax, eax
jne 0x406c3d
mov eax, dword [0x412024]
test eax, eax
jne 0x406c3d
mov eax, dword [0x4123ec]
test eax, eax
je 0x406c3d
mov ecx, dword [0x412010]
mov eax, dword [ecx + 0x40]
mov edx, dword [ecx + 0x38]
cmp eax, edx
jae 0x406c3d
test eax, eax
je 0x406c3d
push 0
mov dword [0x412028], 1
mov dword [0x412da8], 0
call fcn.00405ee0
add esp, 4
push 0
push 0x3e8
push 4
push edi
call ebx
mov ecx, dword [0x412d70]
push 0
push 0
push ecx
call dword [sym.imp.USER32.dll_InvalidateRect]
test dword [0x412088], 0x22000000
je 0x406c70
push 0
push 0x3e8
push 6
push edi
call ebx
mov dword [0x41202c], 1
push 0
push 1
call fcn.00406410
mov edx, dword [0x4133d0]
add esp, 8
push edx
call dword [sym.imp.USER32.dll_IsWindowVisible]
test eax, eax
je 0x406c96
push esi
call fcn.00409ff0
add esp, 4
mov eax, dword [0x412010]
mov esi, dword [sym.imp.USER32.dll_KillTimer]
test eax, eax
je 0x406f73
cmp dword [ebp], 1
jne 0x406f73
mov esi, dword [eax + 0x64]
add esi, eax
push esi
push 0x412dc0
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x406cd9
push 0x208
push esi
push 0x412dc0
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
mov eax, dword [0x412010]
mov ecx, dword [0x412018]
mov eax, dword [eax + 0x3c]
cmp ecx, eax
jae 0x406da5
mov eax, dword [0x412028]
xor ebp, ebp
cmp eax, ebp
je 0x406d14
push 4
push edi
call dword [sym.imp.USER32.dll_KillTimer]
push ebp
push 0x3e8
push 4
push edi
mov dword [0x412da8], ebp
call ebx
cmp dword [0x412024], ebp
je 0x406d49
push 3
push edi
call dword [sym.imp.USER32.dll_KillTimer]
push ebp
push 0x3e8
push 4
push edi
mov dword [0x412024], ebp
mov dword [0x412da8], ebp
call ebx
mov esi, 1
mov dword [0x412028], esi
jmp 0x406d4e
mov esi, 1
cmp dword [0x412414], esi
jne 0x406dbc
mov ecx, dword [0x412010]
test byte [ecx + 0x3c], 1
je 0x406d83
mov eax, dword [0x41241c]
mov dword [0x41201c], esi
mov dword [0x4126fc], eax
mov dword [0x412b30], esi
mov edx, dword [eax + 0x10]
push ebp
push edx
push esi
push edi
call ebx
jmp 0x406dbc
mov eax, dword [0x41241c]
mov dword [0x412020], esi
mov dword [0x4126f8], eax
mov dword [0x412708], esi
mov eax, dword [eax + 0x10]
push ebp
push eax
push 2
push edi
call ebx
jmp 0x406dbc
xor ebp, ebp
cmp eax, ebp
jne 0x406db7
mov dword [0x41201c], ebp
mov dword [0x412020], ebp
mov esi, 1
mov eax, dword [0x412010]
mov ecx, dword [eax + 0x38]
mov dword [0x41239c], ecx
mov edx, dword [eax + 0x40]
mov dword [0x412704], edx
mov ecx, dword [eax + 0x3c]
mov dword [0x412018], ecx
mov eax, dword [eax + 8]
test al, 7
je 0x406eda
test al, 8
jne 0x406eda
mov ecx, dword [esp + 0x10]
cmp ecx, 0x65
je 0x406eda
cmp ecx, 0x66
je 0x406eda
cmp ecx, 0x12d
je 0x406eda
cmp ecx, 0x12e
je 0x406eda
cmp ecx, 0x1f7
je 0x406eda
cmp ecx, 0x1f5
je 0x406eda
mov eax, dword [0x4123c0]
cmp eax, 0xce
je 0x406eda
cmp ecx, eax
je 0x406eda
push ebp
push 0x3e8
push 6
push edi
call ebx
push esi
push esi
mov dword [0x41202c], esi
call fcn.00406410
mov eax, dword [0x412010]
add esp, 8
cmp eax, ebp
je 0x406e7b
cmp dword [eax + 0x64], ebp
je 0x406e7b
call fcn.004071c0
mov eax, dword [0x412040]
cmp eax, ebp
jne 0x406ebb
mov edx, dword [0x4133d0]
push ebp
push 2
push edx
call fcn.00409ad0
mov eax, dword [0x4133d0]
add esp, 0xc
push ebp
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [0x412008]
cmp eax, ebp
je 0x406eda
mov ecx, dword [0x41322c]
cmp ecx, ebp
je 0x406eda
push eax
call ecx
jmp 0x406eda
cmp eax, esi
jne 0x406eda
mov ecx, dword [0x4133d0]
push ebp
push 2
push ecx
call fcn.00409ad0
add esp, 0xc
push 6
push edi
call dword [sym.imp.USER32.dll_ShowWindow]
test dword [0x412088], 0xffe7e000
je 0x406f56
mov edx, dword [0x412010]
cmp dword [edx + 4], ebp
jne 0x406f56
mov eax, dword [0x412040]
cmp eax, 3
jne 0x406f32
mov eax, dword [0x4133d0]
push ebp
push 2
push eax
call fcn.00409ad0
mov ecx, dword [0x4133d0]
add esp, 0xc
push ebp
push ecx
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [0x412008]
cmp eax, ebp
je 0x406f56
mov ecx, dword [0x41322c]
cmp ecx, ebp
je 0x406f56
push eax
call ecx
jmp 0x406f56
cmp eax, esi
jne 0x406f56
mov edx, dword [0x4133d0]
push ebp
push 2
push edx
call fcn.00409ad0
mov eax, dword [0x4133d0]
add esp, 0xc
push 6
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
push edi
call fcn.004090e0
add esp, 4
push edi
call fcn.004090b0
mov eax, dword [0x412010]
mov esi, dword [sym.imp.USER32.dll_KillTimer]
add esp, 4
test eax, eax
je 0x406fc5
mov ecx, dword [eax + 4]
test eax, eax
mov dword [0x412088], ecx
je 0x406fc5
test byte [eax + 4], 1
je 0x406fc5
mov eax, dword [0x412024]
test eax, eax
je 0x406fa8
mov edx, dword [0x4133d0]
push 3
push edx
call esi
mov dword [0x412024], 0
mov eax, dword [0x412028]
test eax, eax
je 0x406fc5
mov eax, dword [0x4133d0]
push 4
push eax
call esi
mov dword [0x412028], 0
mov eax, dword [0x4123c0]
cmp eax, 0x190
jb 0x407014
cmp eax, 0x19e
ja 0x407014
mov eax, dword [0x412024]
test eax, eax
je 0x406ff6
mov ecx, dword [0x4133d0]
push 3
push ecx
call esi
mov dword [0x412024], 0
mov eax, dword [0x412028]
test eax, eax
je 0x407014
mov edx, dword [0x4133d0]
push 4
push edx
call esi
mov dword [0x412028], 0
push edi
call fcn.00406020
mov eax, dword [0x412398]
mov ebp, dword [sym.imp.USER32.dll_InvalidateRect]
add esp, 4
push 0
push 0
push eax
call ebp
mov ecx, dword [0x412398]
mov esi, dword [sym.imp.USER32.dll_UpdateWindow]
push ecx
call esi
mov edx, dword [0x41237c]
push 0
push 0
push edx
call ebp
mov eax, dword [0x41237c]
push eax
call esi
mov ecx, dword [0x413224]
push 0
push 0
push ecx
call ebp
mov edx, dword [0x413224]
push edx
call esi
mov eax, dword [0x412da4]
push 0
push 0
push eax
call ebp
mov ecx, dword [0x412da4]
push ecx
call esi
mov edx, dword [0x412b34]
push 0
push 0
push edx
call ebp
mov eax, dword [0x412b34]
push eax
call esi
mov ecx, dword [0x4126d4]
push 0
push 0
push ecx
call ebp
mov edx, dword [0x4126d4]
push edx
call esi
mov eax, dword [0x4126d0]
push 0
push 0
push eax
call ebp
mov ecx, dword [0x4126d0]
push ecx
call esi
mov eax, dword [0x4123c0]
mov ecx, dword [esp + 0x10]
cmp ecx, eax
je 0x4071a6
cmp ecx, 0xc9
jne 0x4070de
cmp eax, 0xc8
je 0x407125
cmp ecx, 0xcb
jne 0x4070ed
cmp eax, 0xca
je 0x407125
mov eax, dword [0x41201c]
test eax, eax
je 0x407109
push 1
push edi
call dword [sym.imp.USER32.dll_KillTimer]
mov dword [0x41201c], 0
mov eax, dword [0x412020]
test eax, eax
je 0x407125
push 2
push edi
call dword [sym.imp.USER32.dll_KillTimer]
mov dword [0x412020], 0
cmp dword [0x412414], 2
jne 0x407153
mov eax, dword [0x41241c]
mov ecx, 1
mov dword [0x41201c], ecx
mov dword [0x4126fc], eax
mov dword [0x412b30], ecx
mov edx, dword [eax + 0x10]
push 0
push edx
push ecx
push edi
call ebx
mov eax, dword [0x4123ec]
test eax, eax
je 0x4071a6
mov eax, dword [0x412704]
test eax, eax
jne 0x4071a6
xor eax, eax
push 1
mov dword [0x412024], 1
mov dword [0x412da8], eax
mov dword [0x41320c], eax
call fcn.00405ee0
mov eax, dword [0x413224]
add esp, 4
push 1
push 0
push eax
call ebp
mov ecx, dword [0x413224]
push ecx
call esi
push 0
push 0x3e8
push 3
push edi
call ebx
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x20c
ret