Function at 0x408020
Capabilities:
Create thread
Get common file path
Inspect load icon resource
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x459be9
mov eax, dword fs:[0]
push eax
sub esp, 0x588
mov eax, dword [0x46b00c]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x578], esi
push 0x70
push 0xfffffffffffffffa
mov dword [ebp - 0x594], 0
mov ebx, dword [sym.imp.USER32.dll_GetWindowLongA]
push esi
call ebx
mov edi, dword [sym.imp.USER32.dll_LoadIconA]
push eax
call edi
push eax
push 1
push 0x80
push esi
mov esi, dword [sym.imp.USER32.dll_SendMessageA]
call esi
push 0x70
push 0xfffffffffffffffa
push dword [ebp - 0x578]
call ebx
push eax
call edi
mov ebx, dword [ebp - 0x578]
push eax
push 0
push 0x80
push ebx
call esi
push 0x3ed
push ebx
call dword [sym.imp.USER32.dll_GetDlgItem]
sub esp, 8
mov dword [0x46b96c], eax
lea edx, [ebp - 0x55c]
mov dword [ebp - 0x55c], 0x4657a8
mov dword [ebp - 0x558], 0x4657b0
mov dword [ebp - 0x554], 0x4657bc
mov dword [ebp - 0x550], 0x4657c4
mov dword [ebp - 0x54c], 0x4657cc
mov dword [ebp - 0x548], 0x4657d4
mov dword [ebp - 0x544], 0x4657dc
mov dword [ebp - 0x540], str.Start
call fcn.00407e20
push 0x104
lea eax, [ebp - 0x224]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0x14
lea eax, [ebp - 0x224]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push str.Memory_t.ttx
lea eax, [ebp - 0x224]
push eax
lea eax, [ebp - 0x53c]
push str._s_s
push eax
call fcn.004030b0
add esp, 0x10
lea eax, [ebp - 0x53c]
push eax
push 0x104
lea eax, [ebp - 0x434]
push eax
push 0x464fb2
push str.GAMEPATH
push str.USERSET
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
je 0x4081a1
mov esi, dword [sym.imp.USER32.dll_SetDlgItemTextA]
lea eax, [ebp - 0x434]
push eax
push 0x3e9
push ebx
call esi
jmp 0x408204
lea ecx, [ebp - 0x58c]
call fcn.004069c0
mov dword [ebp - 4], 0
cmp dword [eax + 0x14], 0x10
jb 0x4081bb
mov eax, dword [eax]
mov esi, dword [sym.imp.USER32.dll_SetDlgItemTextA]
push eax
push 0x3e9
push ebx
call esi
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x578]
cmp eax, 0x10
jb 0x4081e9
inc eax
push eax
push dword [ebp - 0x58c]
call fcn.00401df0
mov dword [ebp - 0x578], 0xf
mov dword [ebp - 0x57c], 0
mov byte [ebp - 0x58c], 0
push 0x4657f4
push 0x403
push ebx
call esi
push 1
push 0x22b
push ebx
call dword [sym.imp.USER32.dll_CheckDlgButton]
mov ecx, ebx
call fcn.00407040
mov esi, dword [sym.imp.USER32.dll_GetSystemMetrics]
push 0
call esi
push 1
mov edi, eax
call esi
mov esi, eax
lea eax, [ebp - 0x584]
push eax
push ebx
call dword [sym.imp.USER32.dll_GetWindowRect]
mov ecx, dword [ebp - 0x578]
sub ecx, dword [ebp - 0x580]
mov eax, dword [ebp - 0x57c]
sub eax, dword [ebp - 0x584]
sub esi, dword [ebp - 0x578]
sub edi, dword [ebp - 0x57c]
push 0x40
push ecx
push eax
mov eax, esi
cdq
sub eax, edx
sar eax, 1
push eax
mov eax, edi
cdq
sub eax, edx
sar eax, 1
push eax
push 0xffffffffffffffff
push ebx
call dword [sym.imp.USER32.dll_SetWindowPos]
mov ecx, ebx
call fcn.00407ef0
push 0
push 0
push ebx
push 0x406500
push 0
push 0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
add esp, 0x18
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push 0x104
lea eax, [ebp - 0x11c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
cmp byte [ebp - 0x11c], 0
mov dword [ebp - 0x564], 0
mov dword [ebp - 0x560], 0
mov dword [ebp - 0x560], 0xf
mov dword [ebp - 0x564], 0
mov byte [ebp - 0x574], 0
jne 0x408302
xor ecx, ecx
jmp 0x408319
lea ecx, [ebp - 0x11c]
lea edx, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x408310
sub ecx, edx
push ecx
lea eax, [ebp - 0x11c]
push eax
lea ecx, [ebp - 0x574]
call fcn.00401b60
mov dword [ebp - 4], 1
push 1
push ecx
push 0x4650f0
lea ecx, [ebp - 0x574]
call fcn.004092b0
push 0xffffffffffffffff
inc eax
lea ecx, [ebp - 0x574]
push eax
lea eax, [ebp - 0x58c]
push eax
call fcn.004091b0
mov esi, eax
mov byte [ebp - 4], 2
lea eax, [ebp - 0x574]
cmp eax, esi
je 0x4083ab
mov eax, dword [ebp - 0x560]
cmp eax, 0x10
jb 0x408384
inc eax
push eax
push dword [ebp - 0x574]
call fcn.00401df0
push esi
lea ecx, [ebp - 0x574]
mov dword [ebp - 0x560], 0xf
mov dword [ebp - 0x564], 0
mov byte [ebp - 0x574], 0
call fcn.00401d80
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x578]
cmp eax, 0x10
jb 0x4083c7
inc eax
push eax
push dword [ebp - 0x58c]
call fcn.00401df0
push 1
push ecx
push 0x4657f8
lea ecx, [ebp - 0x574]
mov dword [ebp - 0x578], 0xf
mov dword [ebp - 0x57c], 0
mov byte [ebp - 0x58c], 0
call fcn.004092b0
push eax
push 0
lea eax, [ebp - 0x554]
push eax
lea ecx, [ebp - 0x574]
call fcn.004091b0
mov esi, eax
mov byte [ebp - 4], 3
lea eax, [ebp - 0x574]
cmp eax, esi
je 0x408459
mov eax, dword [ebp - 0x560]
cmp eax, 0x10
jb 0x408432
inc eax
push eax
push dword [ebp - 0x574]
call fcn.00401df0
push esi
lea ecx, [ebp - 0x574]
mov dword [ebp - 0x560], 0xf
mov dword [ebp - 0x564], 0
mov byte [ebp - 0x574], 0
call fcn.00401d80
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x540]
cmp eax, 0x10
jb 0x408475
inc eax
push eax
push dword [ebp - 0x554]
call fcn.00401df0
cmp dword [ebp - 0x560], 0x10
lea eax, [ebp - 0x574]
mov dword [ebp - 0x540], 0xf
cmovae eax, dword [ebp - 0x574]
push eax
push ebx
mov dword [ebp - 0x544], 0
mov byte [ebp - 0x554], 0
call dword [sym.imp.USER32.dll_SetWindowTextA]
push 0x104
lea eax, [ebp - 0x32c]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x32c]
push 0x104
push eax
push 0x3e9
push ebx
call dword [sym.imp.USER32.dll_GetDlgItemTextA]
cmp byte [ebp - 0x32c], 0
je 0x408603
xorps xmm0, xmm0
movq qword [ebp - 0x57c], xmm0
mov dword [ebp - 0x57c], 0
mov dword [ebp - 0x578], 0
mov byte [ebp - 4], 4
lea eax, [ebp - 0x434]
push eax
lea ecx, [ebp - 0x57c]
call fcn.00401750
test eax, eax
je 0x40856b
lea eax, [ebp - 0x554]
push eax
lea ecx, [ebp - 0x57c]
call fcn.00401880
mov byte [ebp - 4], 5
mov ebx, 1
mov dword [ebp - 0x594], ebx
cmp dword [eax + 0x14], 0x10
jb 0x40854b
mov ecx, dword [eax]
jmp 0x40854d
mov ecx, eax
mov edx, dword [eax + 0x10]
push 8
push str.11_0_7_7
call fcn.00403ac0
add esp, 8
test eax, eax
je 0x408571
mov byte [ebp - 0x58d], bl
jmp 0x408578
mov ebx, dword [ebp - 0x594]
mov byte [ebp - 0x58d], 0
mov dword [ebp - 4], 4
test bl, 1
je 0x4085c0
and ebx, 0xfffffffe
mov dword [ebp - 0x594], ebx
mov eax, dword [ebp - 0x540]
cmp eax, 0x10
jb 0x4085a5
inc eax
push eax
push dword [ebp - 0x554]
call fcn.00401df0
mov dword [ebp - 0x540], 0xf
mov dword [ebp - 0x544], 0
mov byte [ebp - 0x554], 0
cmp byte [ebp - 0x58d], 0
je 0x4085dd
push 0
push 0x465808
push 0x465814
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov byte [ebp - 4], 1
push dword [ebp - 0x57c]
call fcn.0041151e
add esp, 4
mov dword [ebp - 0x57c], 0
mov dword [ebp - 0x578], 0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x560]
cmp eax, 0x10
jb 0x408622
inc eax
push eax
push dword [ebp - 0x574]
call fcn.00401df0
mov dword [ebp - 0x560], 0xf
xor al, al
mov dword [ebp - 0x564], 0
mov byte [ebp - 0x574], 0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0041150d
mov esp, ebp
pop ebp
ret