Function at 0x4039a0
Capabilities:
Check for time delay via gettickcount
Check os version
Get common file path
Print debug messages

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x23b8
call fcn.00411200
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, dword [ebp + 0xc]
push 0x5c
push ebx
mov dword [ebp - 0xc], eax
call fcn.0040ff10
add esp, 8
mov esi, eax
call fcn.00404100
test esi, esi
mov edi, eax
mov dword [ebp - 4], 0
jne 0x4039e8
push 0x2f
push ebx
call fcn.0040ff10
add esp, 8
mov esi, eax
mov ecx, dword [ebp + 0x14]
mov eax, ecx
and eax, 0x10
mov dword [ebp - 8], eax
jne 0x403a68
test cl, 1
jne 0x403a68
mov eax, dword [0x420b9c]
test eax, eax
je 0x403a68
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp + 0x14], eax
mov eax, dword [0x420b9c]
cmp eax, 3
jge 0x40409c
mov esi, dword [sym.imp.USER32.dll_GetMessageA]
mov edi, dword [sym.imp.USER32.dll_TranslateMessage]
mov ebx, dword [sym.imp.USER32.dll_DispatchMessageA]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp + 0x14]
cmp eax, 0x3a98
jae 0x40409c
push 0
push 0
lea eax, [ebp - 0x28]
push 0
push eax
call esi
lea ecx, [ebp - 0x28]
push ecx
call edi
lea edx, [ebp - 0x28]
push edx
call ebx
cmp dword [0x420b9c], 3
jl 0x403a2c
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
inc dword [0x420b9c]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ebx, dword [sym.imp.USER32.dll_wsprintfA]
push eax
lea eax, [ebp - 0xec]
push str.__tid_x
push eax
call ebx
add esp, 0xc
test edi, edi
je 0x403ab3
push edi
lea edi, [ebp - 0xec]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push str.__thread_s
lea ecx, [ebp + ecx - 0xec]
push ecx
call ebx
add esp, 0xc
lea edx, [ebp - 0xec]
push edx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
lea eax, [ebp - 0xbb8]
push str.Assert__tid_x_s_n
push eax
call ebx
add esp, 0x10
lea ecx, [ebp - 0xbb8]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
test esi, esi
je 0x403ae6
inc esi
jmp 0x403ae9
mov esi, dword [ebp + 0xc]
mov eax, dword [ebp - 0xc]
mov byte [ebp - 0x11c], 0
test eax, eax
je 0x403b0a
push eax
push eax
lea edx, [ebp - 0x11c]
push str.__error_code__u__x_x_
push edx
call ebx
add esp, 0x10
mov eax, dword [ebp + 0x14]
and eax, 2
mov dword [ebp + 0xc], eax
mov eax, dword [ebp + 8]
je 0x403b20
mov dword [ebp - 4], eax
mov eax, str.Unhandled_Exception__GPF__n_n
push eax
mov eax, dword [ebp + 0x10]
push 0x419465
lea ecx, [ebp - 0xec]
push 0x419477
lea edx, [ebp - 0x11c]
push ecx
push edx
push eax
push esi
lea ecx, [ebp - 0xbb8]
push str.File__hs__line__d_s_s_n_nBuild:__hs___.17hs__n_nExpression:__s
push ecx
call ebx
add esp, 0x24
lea edx, [ebp - 0x3b8]
push 0x104
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x3b8]
push 0x5c
push eax
call fcn.00401450
mov edi, eax
or ecx, 0xffffffff
inc edi
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [ebp - 0xb8]
mov eax, ecx
mov esi, edi
mov edi, edx
push 0x2e
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0xb8]
push ecx
call fcn.00401450
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x403bd5
lea edi, [ebp - 0xb8]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
mov eax, dword [str..exe]
dec ecx
lea esi, [ebp + ecx - 0xb8]
mov edx, esi
mov dword [edx], eax
mov cl, byte [0x41c5ec]
mov byte [edx + 4], cl
call fcn.004038c0
test eax, eax
jle 0x403bef
push eax
lea edx, [esi + 1]
push 0x41c5e4
push edx
call ebx
add esp, 0xc
add esi, eax
mov eax, dword [str..err]
lea edi, [ebp - 0x3b8]
mov dword [esi], eax
mov cl, byte [0x41c5e0]
mov byte [esi + 4], cl
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x2b4]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x5c
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x2b4]
push ecx
call fcn.00401450
mov edx, dword [str.Support_]
inc eax
mov dword [ebp + 8], eax
lea edi, [ebp - 0xb8]
mov dword [eax], edx
mov ecx, dword [0x41c5d4]
push 0x41c5cc
mov dword [eax + 4], ecx
mov dl, byte [0x41c5d8]
or ecx, 0xffffffff
mov byte [eax + 8], dl
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [ebp - 0x2b4]
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [ebp - 0x2b4]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.004111ec
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x403d40
lea edi, [ebp - 0xb8]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea eax, [ebp - 0x2b4]
mov edx, ecx
mov esi, edi
mov edi, dword [ebp + 8]
push 0x41c5cc
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.004111ec
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x403d40
lea ecx, [ebp - 0x2b4]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea edi, [ebp - 0xb8]
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x2b4]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x41c5cc
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [ebp - 0x2b4]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.004111ec
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x403f70
lea ecx, [ebp - 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov ecx, 0x25
xor eax, eax
lea edi, [ebp - 0x1b0]
lea edx, [ebp - 0x1b0]
rep stosd dword es:[edi], eax
push edx
mov dword [ebp - 0x1b0], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov eax, dword [ebp - 0x1a0]
cmp eax, 2
mov eax, 0x41c5c8
je 0x403d85
mov eax, 0x41c5c4
mov ecx, dword [ebp - 0x1a8]
mov edx, dword [ebp - 0x1ac]
push ecx
mov ecx, dword [ebp - 0x14]
push edx
mov edx, dword [ebp - 0x16]
push eax
mov eax, dword [ebp - 0x12]
and eax, 0xffff
and ecx, 0xffff
push eax
mov eax, dword [ebp - 0x18]
and edx, 0xffff
push ecx
mov ecx, dword [ebp - 0x1a]
and eax, 0xffff
push edx
mov edx, dword [ebp - 0x1e]
push eax
mov eax, dword [ebp - 0x20]
and ecx, 0xffff
and edx, 0xffff
push ecx
and eax, 0xffff
push edx
push eax
lea ecx, [ebp - 0x23b8]
push str._04d__02d__02d__02d:_02d:_02d._03d__Win_s__d._d_n
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
lea edx, [ebp - 0x23b8]
push ebx
push edx
call fcn.00411189
lea eax, [ebp - 0xbb8]
push ebx
push eax
call fcn.00411189
mov esi, dword [ebp - 4]
add esp, 0x40
test esi, esi
je 0x403e17
push ebx
push esi
call fcn.00411189
add esp, 8
push ebx
push 0x41c58c
call fcn.00411189
mov eax, dword [0x4213e0]
add esp, 8
test eax, eax
je 0x403f5a
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jne 0x403f5a
lea ecx, [ebp - 0x1bb8]
push 0x1000
push ecx
mov byte [ebp - 0x1bb8], 0
call eax
push ebx
push str._nCallstack:_n
call fcn.00411189
lea edx, [ebp - 0x1bb8]
push ebx
push edx
call fcn.00411189
mov al, byte [ebp - 0x1bb8]
add esp, 0x18
xor esi, esi
lea ecx, [ebp - 0x1bb8]
test al, al
je 0x403e96
cmp al, 0xa
jne 0x403e89
inc esi
cmp esi, 6
je 0x403e93
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x403e7f
jmp 0x403e96
mov byte [ecx], 0
lea eax, [ebp - 0x1bb8]
lea edi, [ebp - 0xbb8]
push eax
or ecx, 0xffffffff
xor eax, eax
push str._n_nCall_Stack:_n_s
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea ecx, [ebp + ecx - 0xbb8]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
cmp esi, 6
jl 0x403ef8
mov edi, str._n..._more_
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0xbb8]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str._n_nDetails_in_file:_n
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0xbb8]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [ebp - 0xbb8]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x2b4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 4]
push ebx
push 0x41c544
call fcn.00411189
push ebx
call fcn.00411133
add esp, 0xc
jmp 0x403f73
mov esi, dword [ebp - 4]
mov eax, dword [ebp - 8]
test eax, eax
jne 0x40409c
test byte [ebp + 0x14], 1
jne 0x40409c
test esi, esi
je 0x403fb4
lea edi, [ebp - 0xbb8]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov eax, 0x7ff
sub eax, ecx
lea ecx, [ebp - 0xbb8]
push eax
push esi
push ecx
call fcn.00411010
add esp, 0xc
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x403fcd
mov ecx, 7
mov esi, str.Unhandled_Exception__GPF___
lea edi, [ebp - 0x78]
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
jmp 0x403ff8
mov edx, dword [str.Assert_failed__]
mov eax, dword [0x41c514]
mov ecx, dword [0x41c518]
mov dword [ebp - 0x78], edx
mov edx, dword [0x41c51c]
mov dword [ebp - 0x74], eax
mov al, byte [0x41c520]
mov dword [ebp - 0x70], ecx
mov dword [ebp - 0x6c], edx
mov byte [ebp - 0x68], al
lea ecx, [ebp - 0x2b4]
push 0x5c
push ecx
call fcn.00401450
add esp, 8
mov ecx, str.copied_to__s
test ebx, ebx
jne 0x404017
mov ecx, str.NOT_copied_to_disk
inc eax
lea edi, [ebp - 0x78]
push eax
push ecx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edx, [ebp + ecx - 0x78]
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
mov eax, dword [0x420b98]
add esp, 0xc
test eax, eax
je 0x404087
push 0x404180
push eax
push 0
push 0
call dword [sym.imp.USER32.dll_SetTimer]
mov esi, eax
lea eax, [ebp - 0x78]
push 0
lea ecx, [ebp - 0xbb8]
push eax
push ecx
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push esi
push 0
call dword [sym.imp.USER32.dll_KillTimer]
push 1
push 0x12
push 0x12
lea edx, [ebp - 0x28]
push 0
push edx
call dword [sym.imp.USER32.dll_PeekMessageA]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x78]
push 0
lea ecx, [ebp - 0xbb8]
push eax
push ecx
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret