Function at 0x401650
Capabilities:
Check for time delay via gettickcount
Hide graphical window
Resolve function by parsing pe exports
Set current directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14c
mov al, byte [0x45ef6c]
test al, al
push ebx
push esi
push edi
je 0x401674
push 0
mov ecx, 0x45ef58
call fcn.004027a0
mov esi, dword [ebp + 8]
cmp esi, 0x8000012f
jne 0x401696
mov esi, 0xa
mov dword [ebp + 8], esi
mov byte [esp + 0x18], 1
mov dword [esp + 0x40], 0
jmp 0x4016b8
cmp esi, 5
setle al
test al, al
mov byte [esp + 0x18], al
je 0x4016ae
mov dword [esp + 0x40], 0
jmp 0x4016b8
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
mov dword [esp + 0x40], eax
mov eax, dword [0x45fc94]
test eax, eax
je 0x4016c6
call fcn.00401240
mov eax, dword [0x45eec8]
test eax, eax
je 0x4016d4
call fcn.004013c0
test esi, esi
jle 0x401776
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x401776
mov ecx, dword [0x45d81c]
mov al, byte [0x45d813]
inc ecx
test al, al
mov byte [esp + 0xd], 1
mov dword [0x45d81c], ecx
jne 0x401735
mov eax, dword [0x45d6e8]
push 0
push 0xa
push 9
push eax
call dword [sym.imp.USER32.dll_SetTimer]
test eax, eax
setne al
test al, al
mov byte [0x45d813], al
jne 0x401735
push 0
push 0x44f56c
push 1
mov ecx, 0x45ebb8
call fcn.0041e040
mov byte [esp + 0xe], 0
mov byte [esp + 0xf], 0
nop
mov esi, dword [ebp + 8]
test esi, esi
jle 0x4017ee
mov al, byte [esp + 0xf]
test al, al
jne 0x4017ee
mov al, byte [0x45d60c]
test al, al
je 0x40177d
mov al, byte [0x45b056]
test al, al
je 0x40177d
mov eax, dword [0x45d82c]
test eax, eax
jne 0x40177d
xor eax, eax
jmp 0x401782
mov byte [esp + 0xd], 0
jmp 0x401735
mov eax, 0x311
push eax
push 0
push 0
lea ecx, [esp + 0x2c]
push ecx
call dword [sym.imp.USER32.dll_GetMessageA]
cmp eax, 0xffffffff
je 0x401740
mov eax, dword [esp + 0x20]
test eax, eax
mov edi, dword [esp + 0x24]
je 0x40185e
cmp eax, dword [0x45d6e8]
je 0x40185e
cmp edi, 0x464
je 0x40185e
xor esi, esi
mov eax, dword [esi*4 + 0x45dde0]
test eax, eax
je 0x4017e6
mov eax, dword [eax]
test eax, eax
je 0x4017e6
lea ecx, [esp + 0x20]
push ecx
push eax
call dword [sym.imp.USER32.dll_IsDialogMessageA]
test eax, eax
jne 0x401851
mov edi, dword [esp + 0x24]
inc esi
cmp esi, 5
jl 0x4017c1
jmp 0x40185e
mov al, byte [0x45d60c]
test al, al
je 0x40180d
mov al, byte [0x45b056]
test al, al
je 0x40180d
mov eax, dword [0x45d82c]
test eax, eax
jne 0x40180d
xor eax, eax
jmp 0x401812
mov eax, 0x311
push 1
push eax
push 0
push 0
lea edx, [esp + 0x30]
push edx
call dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
jne 0x401797
test esi, esi
jne 0x4020bf
mov al, byte [esp + 0xe]
test al, al
jne 0x4020bf
push esi
call dword [sym.imp.KERNEL32.DLL_Sleep]
mov byte [esp + 0xe], 1
jmp 0x401740
cmp esi, 5
jl 0x401740
mov edi, dword [esp + 0x24]
cmp edi, 0x44
jne 0x401873
mov edi, dword [esp + 0x28]
xor ebx, ebx
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], ebx
jmp 0x401877
mov ebx, dword [esp + 0x28]
cmp edi, 0x312
ja 0x4019b0
je 0x4019d0
mov eax, edi
sub eax, 0x12
je 0x40199b
sub eax, 0xee
je 0x40196f
sub eax, 0x13
jne 0x40200d
mov eax, dword [esp + 0x2c]
test eax, eax
jne 0x40200d
mov eax, dword [0x45fc94]
test eax, eax
je 0x4018c2
call fcn.00401240
mov eax, dword [0x45eec8]
test eax, eax
je 0x4018d0
call fcn.004013c0
cmp dword [ebp + 0xc], 1
je 0x401740
mov eax, dword [ebp + 8]
test eax, eax
jle 0x401740
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x40]
mov ecx, dword [ebp + 8]
push edx
push eax
push ecx
call fcn.004011f0
add esp, 0xc
test eax, eax
je 0x401740
mov al, byte [esp + 0xd]
test al, al
je 0x401911
dec dword [0x45d81c]
mov al, byte [0x45d813]
test al, al
mov eax, dword [0x45d81c]
je 0x40219a
test eax, eax
jne 0x4021d2
mov eax, dword [0x45eec8]
test eax, eax
jne 0x4021d2
mov eax, dword [0x45fc94]
test eax, eax
jne 0x4021d2
mov ecx, dword [0x45d6e8]
push 9
push ecx
call dword [sym.imp.USER32.dll_KillTimer]
test eax, eax
je 0x4021d2
mov byte [0x45d813], 0
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [esp + 0x20]
cmp edx, dword [0x45d6ec]
jne 0x40200d
cmp ebx, 0x1b
jne 0x40200d
mov eax, dword [0x45d6e8]
push 0
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
jmp 0x401740
push 0
push 0
push 6
mov ecx, 0x45ebb8
call fcn.0041e040
jmp 0x401740
cmp edi, 0x400
jb 0x40200d
cmp edi, 0x402
jbe 0x4019d0
cmp edi, 0x464
jne 0x40200d
mov eax, edi
sub eax, 0x401
je 0x401abf
dec eax
je 0x401a95
sub eax, 0x62
jne 0x401b00
mov ecx, dword [esp + 0x20]
push ecx
call fcn.004010a0
add esp, 4
test eax, eax
mov dword [esp + 0x10], eax
je 0x401740
cmp ebx, 0xffffffff
jne 0x401a2f
mov edx, eax
mov eax, dword [edx + 0x36c0]
test eax, eax
mov dword [esp + 0x44], eax
je 0x401740
mov eax, edx
add eax, 0x36c8
mov dword [esp + 0x3c], eax
jmp 0x401b00
cmp ebx, 0xfffffffe
jne 0x401a5b
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx + 0x36c4]
test eax, eax
mov dword [esp + 0x44], eax
je 0x401740
mov edx, ecx
add edx, 0x36c9
mov dword [esp + 0x3c], edx
jmp 0x401b00
mov eax, dword [esp + 0x10]
cmp ebx, dword [eax + 8]
jae 0x401740
mov edx, ebx
imul edx, edx, 0x1c
mov ecx, eax
lea eax, [edx + ecx]
mov edx, dword [eax + 0x18]
test edx, edx
mov dword [esp + 0x44], edx
jne 0x401a8c
movzx eax, byte [eax + 0x1d]
push eax
call fcn.00438970
jmp 0x401740
add eax, 0x1c
mov dword [esp + 0x3c], eax
jmp 0x401b00
mov ecx, dword [esp + 0x2c]
push ecx
mov ecx, 0x45ebb8
call fcn.004010d0
test eax, eax
mov dword [esp + 0x14], eax
je 0x401740
mov edx, eax
mov eax, dword [edx + 0x6c]
test eax, eax
je 0x401740
jmp 0x401b00
cmp ebx, dword [0x45fc9c]
jae 0x401740
mov eax, dword [0x45fc98]
mov ecx, dword [esp + 0x2c]
mov ebx, dword [eax + ebx*4]
push ecx
mov ecx, ebx
mov dword [esp + 0x4c], ebx
call fcn.00408ab0
mov edx, dword [ebx + 8]
cmp byte [edx], 0
jne 0x401740
mov al, byte [esp + 0x2c]
mov ebx, dword [esp + 0x28]
mov edi, dword [esp + 0x24]
mov byte [0x45eef8], al
mov eax, dword [0x45d820]
cmp eax, dword [0x45b060]
jl 0x401b70
cmp eax, 0x14
jg 0x401740
mov eax, edi
sub eax, 0x401
je 0x401b41
dec eax
je 0x401b38
sub eax, 0x62
je 0x401b32
push ebx
call fcn.004011c0
add esp, 4
jmp 0x401b4c
mov ecx, dword [esp + 0x44]
jmp 0x401b47
mov eax, dword [esp + 0x14]
mov ecx, dword [eax + 0x6c]
jmp 0x401b47
mov eax, dword [esp + 0x48]
mov ecx, dword [eax]
mov edx, dword [ecx + 4]
mov al, byte [edx]
cmp al, 0xc1
je 0x401b70
cmp al, 0xaf
je 0x401b70
cmp al, 0xbd
je 0x401b70
cmp al, 0xbe
je 0x401b70
cmp al, 0xb9
je 0x401b70
cmp al, 0xba
je 0x401b70
cmp al, 0xbb
je 0x401b70
cmp al, 0xbc
jne 0x401740
mov eax, edi
sub eax, 0x401
je 0x401bdb
dec eax
je 0x401bce
sub eax, 0x62
je 0x401bb7
mov eax, dword [0x45c5a0]
cmp bx, word [eax]
jae 0x401ba0
movzx ecx, bx
mov esi, dword [ecx*4 + 0x45f190]
mov ecx, esi
call fcn.00401110
test al, al
jne 0x401bae
push ebx
call fcn.00401150
add esp, 4
jmp 0x401740
mov edx, dword [esi + 0x30]
mov dword [esp + 0x1c], edx
jmp 0x401be6
mov eax, dword [esp + 0x3c]
cmp byte [eax], 0
jne 0x401740
mov dword [esp + 0x1c], 0
jmp 0x401be6
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx + 0x78]
mov dword [esp + 0x1c], edx
jmp 0x401be6
mov eax, dword [esp + 0x48]
mov ecx, dword [eax + 0x10]
mov dword [esp + 0x1c], ecx
mov edx, dword [esp + 0x1c]
cmp edx, dword [0x45d614]
jl 0x401740
mov eax, dword [0x45eec8]
test eax, eax
jne 0x401c32
mov eax, dword [0x45fc94]
test eax, eax
jne 0x401c32
mov al, byte [0x45d813]
test al, al
je 0x401c32
mov eax, dword [0x45d6e8]
push 9
push eax
call dword [sym.imp.USER32.dll_KillTimer]
test eax, eax
mov edi, dword [esp + 0x24]
mov ebx, dword [esp + 0x28]
je 0x401c32
mov byte [0x45d813], 0
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x401c8e
mov ecx, dword [0x45de54]
mov al, byte [ecx + 0x14]
test al, al
jne 0x401c4a
mov eax, dword [ecx]
jmp 0x401c5f
cmp al, 1
jne 0x401c5a
mov ecx, 0x45ef58
call section..text
jmp 0x401c5f
mov eax, str.Unsupported_script_variable_type.
push 0x7f
push eax
push 0x45d64e
call fcn.00443880
mov ebx, dword [esp + 0x34]
mov ecx, 0x3a
mov esi, 0x45d5f8
lea edi, [esp + 0x7c]
mov byte [0x45d6cd], 0
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x30]
add esp, 0xc
mov eax, edi
sub eax, 0x402
je 0x401cdc
sub eax, 0x62
je 0x401d0e
cmp edi, 0x401
mov ecx, dword [0x45eeac]
mov edx, dword [0x45eef0]
mov dword [0x45eeb0], ecx
mov dword [0x45eef4], edx
jne 0x401ccc
mov eax, dword [esp + 0x48]
mov ecx, dword [eax]
mov edx, dword [ecx]
mov dword [0x45eeac], edx
jmp 0x401d0e
push ebx
call fcn.00401190
add esp, 4
mov dword [0x45eeac], eax
jmp 0x401d0e
mov esi, dword [esp + 0x14]
push 0x64
push esi
push 0x45ede0
call fcn.00443880
mov byte [0x45ee44], 0
mov eax, dword [esi + 0x74]
push 0x64
push eax
push 0x45ee45
call fcn.00443880
add esp, 0x18
mov byte [0x45eea9], 0
mov eax, dword [0x45d838]
test eax, eax
je 0x401d22
push 0x45de58
call dword [sym.imp.KERNEL32.DLL_SetCurrentDirectoryA]
xor ebx, ebx
push ebx
mov ecx, 0x45ebb8
call fcn.00410910
mov eax, dword [0x45ef2c]
cmp eax, ebx
mov ecx, 0x3a
mov esi, 0x45d400
mov edi, 0x45d5f8
rep movsd dword es:[edi], dword [esi]
je 0x401da4
cmp dword [0x45ef28], ebx
je 0x401da4
cmp eax, ebx
mov byte [0x45d60c], bl
jle 0x401da4
mov cl, byte [0x45d814]
test cl, cl
jne 0x401da4
cmp eax, 0xa
jge 0x401d6f
mov eax, 0xa
mov ecx, dword [0x45d6e8]
push 0x401350
push eax
push 0xa
push ecx
call dword [sym.imp.USER32.dll_SetTimer]
test eax, eax
setne al
test al, al
mov byte [0x45d814], al
jne 0x401da4
push ebx
push str.SetTimer___unexpectedly_failed.
push 1
mov ecx, 0x45ebb8
call fcn.0041e040
mov edx, dword [esp + 0x1c]
mov dword [0x45d614], edx
mov dword [0x45ef20], ebx
mov dword [0x45ef24], ebx
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
mov ecx, dword [esp + 0x24]
cmp ecx, 0x402
mov dword [0x45ef30], eax
je 0x401dd6
mov dword [0x45eef0], eax
mov edx, dword [0x45d820]
inc edx
mov eax, ecx
sub eax, 0x401
mov dword [0x45d820], edx
je 0x401e79
dec eax
je 0x401e43
sub eax, 0x62
je 0x401e07
mov eax, dword [esp + 0x28]
push eax
call fcn.00408000
add esp, 4
jmp 0x401e82
mov ecx, dword [0x45de54]
push ebx
push 0xffffffffffffffff
push ebx
call fcn.0043e8a0
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx]
mov esi, dword [esp + 0x3c]
mov eax, dword [esp + 0x44]
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
mov dword [0x45d6d0], edx
push ebx
mov byte [esi], 1
mov ecx, dword [eax + 4]
push 1
call fcn.0041d2e0
mov byte [esi], 0
jmp 0x401e82
mov eax, dword [esp + 0x28]
cmp eax, 5
jae 0x401e5f
mov eax, dword [eax*4 + 0x45dde0]
cmp eax, ebx
je 0x401e5f
mov ecx, dword [eax]
mov dword [0x45d6d0], ecx
mov edx, dword [esp + 0x14]
mov eax, dword [edx + 0x6c]
mov ecx, dword [eax + 4]
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 1
call fcn.0041d2e0
jmp 0x401e82
mov ecx, dword [esp + 0x48]
call fcn.00408a40
mov ecx, dword [0x45d820]
mov al, byte [0x45d814]
dec ecx
test al, al
mov dword [0x45d820], ecx
mov byte [0x45d60c], 1
je 0x401eb9
mov ecx, dword [0x45d6e8]
push 0xa
push ecx
call dword [sym.imp.USER32.dll_KillTimer]
test eax, eax
je 0x401eb9
mov byte [0x45d814], 0
mov eax, dword [esp + 0x24]
cmp eax, 0x312
je 0x401ecb
cmp eax, 0x400
jne 0x401ef6
mov eax, dword [esp + 0x28]
mov edx, dword [0x45c5a0]
cmp ax, word [edx]
jae 0x401eef
movzx eax, ax
mov ecx, dword [eax*4 + 0x45f190]
mov dl, byte [ecx + 0x20]
mov byte [0x45b055], dl
jmp 0x401ef6
mov byte [0x45b055], 0xff
cmp dword [ebp + 0xc], ebx
jne 0x401ff7
push ebx
mov ecx, 0x3a
lea esi, [esp + 0x74]
mov edi, 0x45d5f8
push 0xffffffffffffffff
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [0x45de54]
push 0x45d64e
call fcn.0043e8a0
mov al, byte [0x45d828]
test al, al
je 0x401f66
mov al, byte [0x45d6d8]
test al, al
je 0x401f66
mov eax, dword [0x45d824]
dec eax
push ebx
mov dword [0x45d824], eax
mov eax, dword [0x45d6e8]
push 0x801f
push eax
mov byte [0x45d828], 0
mov byte [0x45d6d8], 0
call dword [sym.imp.USER32.dll_GetMenu]
push eax
call dword [sym.imp.USER32.dll_CheckMenuItem]
push ebx
mov ecx, 0x45ebb8
call fcn.00410910
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x40]
mov eax, dword [ebp + 8]
push ecx
push edx
push eax
mov byte [0x45d60c], 1
call fcn.004011f0
add esp, 0xc
test eax, eax
je 0x401fa1
mov byte [esp + 0xf], 1
mov byte [esp + 0x18], 1
jmp 0x401740
mov al, byte [esp + 0xd]
test al, al
je 0x401740
mov al, byte [0x45d813]
test al, al
jne 0x401740
mov ecx, dword [0x45d6e8]
push 0
push 0xa
push 9
push ecx
call dword [sym.imp.USER32.dll_SetTimer]
test eax, eax
setne al
test al, al
mov byte [0x45d813], al
jne 0x401740
push 0
push 0x44f56c
push 1
mov ecx, 0x45ebb8
call fcn.0041e040
jmp 0x401740
mov byte [0x45d60c], 1
mov dword [0x45d614], 0x80000000
jmp 0x401740
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov ebx, eax
test ebx, ebx
je 0x402080
lea edx, [esp + 0x4c]
push edx
push ebx
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcessId]
cmp dword [esp + 0x4c], eax
jne 0x402080
push 0x20
lea eax, [esp + 0x54]
push eax
push ebx
call dword [sym.imp.USER32.dll_GetClassNameA]
mov edi, str.32770
lea esi, [esp + 0x50]
mov ecx, 7
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x402080
lea eax, [esp + 0x20]
push eax
push ebx
call dword [sym.imp.USER32.dll_IsDialogMessageA]
test eax, eax
je 0x402080
mov eax, dword [0x45d838]
test eax, eax
je 0x401740
push 0x45de58
call dword [sym.imp.KERNEL32.DLL_SetCurrentDirectoryA]
jmp 0x401740
mov eax, dword [0x45d6f8]
test eax, eax
je 0x4020a4
mov edx, dword [0x45d6e8]
lea ecx, [esp + 0x20]
push ecx
push eax
push edx
call dword [sym.imp.USER32.dll_TranslateAcceleratorA]
test eax, eax
jne 0x401740
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea ecx, [esp + 0x20]
push ecx
call dword [sym.imp.USER32.dll_DispatchMessageA]
jmp 0x401740
mov al, byte [esp + 0xd]
test al, al
je 0x4020cd
dec dword [0x45d81c]
mov al, byte [0x45d813]
test al, al
je 0x402111
test esi, esi
jle 0x40214d
mov eax, dword [0x45d81c]
test eax, eax
jne 0x40214d
mov eax, dword [0x45eec8]
test eax, eax
jne 0x40214d
mov eax, dword [0x45fc94]
test eax, eax
jne 0x40214d
mov edx, dword [0x45d6e8]
push 9
push edx
call dword [sym.imp.USER32.dll_KillTimer]
test eax, eax
je 0x40214d
mov byte [0x45d813], 0
jmp 0x40214d
mov eax, dword [0x45d81c]
test eax, eax
je 0x40214d
mov eax, dword [0x45d6e8]
push 0
push 0xa
push 9
push eax
call dword [sym.imp.USER32.dll_SetTimer]
test eax, eax
setne al
test al, al
mov byte [0x45d813], al
jne 0x40214d
push 0
push 0x44f56c
push 1
mov ecx, 0x45ebb8
call fcn.0041e040
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
mov cl, byte [esp + 0x18]
test cl, cl
jne 0x402171
mov ecx, dword [esp + 0x40]
sub ecx, eax
add ecx, esi
cmp ecx, 5
jle 0x402171
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test esi, esi
jl 0x4021d2
mov dword [0x45ef30], eax
mov dword [0x45ef20], 0
mov dword [0x45ef24], 0
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test eax, eax
je 0x4021d2
mov edx, dword [0x45d6e8]
push 0
push 0xa
push 9
push edx
call dword [sym.imp.USER32.dll_SetTimer]
test eax, eax
setne al
test al, al
mov byte [0x45d813], al
jne 0x4021d2
push 0
push 0x44f56c
push 1
mov ecx, 0x45ebb8
call fcn.0041e040
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret