Function at 0x4020f0
Capabilities:
Create thread

Disassembly:
sub esp, 0x140
push ebx
push ebp
push esi
lea eax, [esp + 0x54]
push edi
push eax
mov dword [esp + 0x5c], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ebx, dword [sym.imp.MSVCRT.dll_strstr]
xor ebp, ebp
mov edi, dword [esp + 0x15c]
mov esi, dword [esp + 0x154]
push 0x40409c
push edi
mov dword [0x4041b4], esi
mov dword [esp + 0x1c], 0x1020
mov dword [esp + 0x20], 0x401800
mov dword [esp + 0x24], ebp
mov dword [esp + 0x28], 4
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], ebp
mov dword [esp + 0x34], ebp
mov dword [esp + 0x38], ebp
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x40], str.TivoliWelcome
call ebx
add esp, 8
test eax, eax
je 0x402176
mov dword [0x404010], ebp
push 0x404088
push edi
call ebx
add esp, 8
test eax, eax
je 0x40218a
call fcn.00402380
mov ebp, dword [esp + 0x5c]
lea edx, [esp + 0xec]
cmp ebp, 4
push 0x64
sbb ecx, ecx
push edx
inc ecx
push 2
push esi
mov dword [0x4041bc], ecx
call dword [sym.imp.USER32.dll_LoadStringA]
lea eax, [esp + 0xec]
push eax
push str.TivoliWelcome
call dword [sym.imp.USER32.dll_FindWindowA]
push 0x404084
push edi
mov ebp, eax
call ebx
add esp, 8
test eax, eax
je 0x402208
call fcn.00402430
test ebp, ebp
je 0x402371
push 0
push 2
push 0x111
push ebp
call dword [sym.imp.USER32.dll_SendMessageA]
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x140
ret 0x10
test ebp, ebp
jne 0x402371
call fcn.00402490
test eax, eax
jne 0x402371
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.USER32.dll_RegisterClassA]
test ax, ax
je 0x402371
call fcn.00402050
mov edi, dword [sym.imp.USER32.dll_ShowWindow]
push ebp
push eax
mov dword [0x4041b0], eax
call edi
mov edx, dword [0x4041b0]
push ebp
push esi
push ebp
push edx
push ebp
push ebp
push ebp
push ebp
lea eax, [esp + 0x10c]
push 0x80000000
push eax
push str.TivoliWelcome
push ebp
call dword [sym.imp.USER32.dll_CreateWindowExA]
mov dword [0x4041c0], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, dword [0x4041c0]
push eax
push ebp
push ecx
call dword [sym.imp.USER32.dll_SetWindowLongA]
mov eax, dword [0x404010]
test eax, eax
je 0x40229a
mov edx, dword [0x4041c0]
push 5
push edx
call edi
mov eax, dword [0x4041bc]
test eax, eax
je 0x4022dd
push 0
push 0x401bf0
push 0
push 0x65
push esi
call dword [sym.imp.USER32.dll_CreateDialogParamA]
mov dword [0x4041b8], eax
cmp dword [esp + 0x68], 2
jne 0x4022dd
lea eax, [esp + 0x10]
push eax
push 0
push 0
push 0x401740
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esp + 0x10], eax
mov esi, dword [sym.imp.USER32.dll_GetMessageA]
push 0
push 0
lea ecx, [esp + 0x44]
push 0
push ecx
call esi
test eax, eax
je 0x402336
mov ebp, dword [sym.imp.USER32.dll_IsDialogMessageA]
mov edi, dword [sym.imp.USER32.dll_TranslateMessage]
mov ebx, dword [sym.imp.USER32.dll_DispatchMessageA]
mov eax, dword [0x4041b8]
lea edx, [esp + 0x3c]
push edx
push eax
call ebp
test eax, eax
jne 0x402325
lea ecx, [esp + 0x3c]
push ecx
call edi
lea edx, [esp + 0x3c]
push edx
call ebx
push 0
push 0
lea eax, [esp + 0x44]
push 0
push eax
call esi
test eax, eax
jne 0x402306
mov eax, dword [0x4041bc]
test eax, eax
je 0x402364
mov ecx, dword [0x4041b8]
push 1
push ecx
call dword [sym.imp.USER32.dll_EndDialog]
cmp dword [esp + 0x68], 2
jne 0x402364
mov eax, dword [esp + 0x10]
test eax, eax
je 0x402364
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [0x4041c0]
push edx
call dword [sym.imp.USER32.dll_DestroyWindow]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x140
ret 0x10