Function at 0x441950
Capabilities:
Get common file path

Disassembly:
sub esp, 0x164
lea eax, [esp + 0x64]
push ebx
push ebp
mov ebp, dword [esp + 0x170]
push esi
push edi
push eax
push 0x100
mov dword [0x4d01ec], ebp
call dword [sym.imp.kernel32.dll_GetCurrentDirectoryA]
lea ecx, [esp + 0x74]
push ecx
call fcn.0041ccf0
call fcn.00415350
push str.name
push str.main
push str.game.ini
call fcn.00442eb0
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
push 0x4b7e74
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str.main
mov edx, ecx
mov esi, edi
mov edi, str.WinName
push str.game.ini
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.00443160
push 0x4b7e68
push str.main
push str.game.ini
mov dword [0x4b93f8], eax
call fcn.00443160
push 0x4b942c
push str.main
push str.game.ini
mov dword [0x4b93fc], eax
call fcn.00443160
push 0x4b9428
push str.main
push str.game.ini
mov dword [0x4b9400], eax
call fcn.00443160
mov esi, dword [sym.imp.USER32.dll_GetSystemMetrics]
mov dword [0x4b9404], eax
mov eax, dword [0x4b93f8]
xor ebx, ebx
add esp, 0x40
cmp eax, ebx
jl 0x441a3f
push ebx
call esi
cmp dword [0x4b93f8], eax
jl 0x441a52
push ebx
call esi
sub eax, dword [0x4b9400]
cdq
sub eax, edx
sar eax, 1
mov dword [0x4b93f8], eax
cmp dword [0x4b93fc], ebx
jl 0x441a66
push 1
call esi
cmp dword [0x4b93fc], eax
jl 0x441a7a
push 1
call esi
sub eax, dword [0x4b9404]
cdq
sub eax, edx
sar eax, 1
mov dword [0x4b93fc], eax
push str.WinName
push str.WinName
call dword [sym.imp.USER32.dll_FindWindowA]
mov esi, eax
cmp esi, ebx
je 0x441aaf
mov edi, dword [sym.imp.USER32.dll_ShowWindow]
push 6
push esi
call edi
push 9
push esi
call edi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x164
ret 0x10
mov eax, dword [0x4d01ec]
push 0x65
push eax
call dword [sym.imp.USER32.dll_LoadIconA]
push ebx
mov dword [0x4d01f4], eax
mov dword [esp + 0x34], 0xb
mov dword [esp + 0x38], 0x4414c0
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebp
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], ebx
call dword [sym.imp.GDI32.dll_GetStockObject]
lea ecx, [esp + 0x30]
mov dword [esp + 0x50], ebx
push ecx
mov dword [esp + 0x50], eax
mov dword [esp + 0x58], str.WinName
call dword [sym.imp.USER32.dll_RegisterClassA]
mov eax, dword [0x4b93f8]
mov edx, dword [0x4b9400]
mov ecx, dword [0x4b93fc]
mov dword [esp + 0x20], eax
add edx, eax
mov eax, dword [0x4b9404]
mov dword [esp + 0x24], ecx
add eax, ecx
mov ecx, dword [0x4d01e4]
mov dword [esp + 0x28], edx
neg ecx
sbb ecx, ecx
push ebx
and ecx, 0xff360000
lea edx, [esp + 0x24]
add ecx, 0xca0000
mov dword [esp + 0x30], eax
or ecx, 0x90000000
push ecx
push edx
call dword [sym.imp.USER32.dll_AdjustWindowRect]
push ebx
push ebx
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x28]
push ebx
sub eax, edx
push ebx
push eax
mov eax, dword [esp + 0x3c]
mov edx, eax
sub edx, ecx
push edx
push eax
push ecx
push 0x90c80000
push str.WinName
push str.WinName
push ebx
call dword [sym.imp.USER32.dll_CreateWindowExA]
push 1
push eax
mov dword [0x4d01e8], eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [0x4d01e8]
push eax
call dword [sym.imp.USER32.dll_UpdateWindow]
push 0x7f00
push ebx
call dword [sym.imp.USER32.dll_LoadCursorA]
push eax
mov dword [0x4d01f0], eax
call dword [sym.imp.USER32.dll_SetCursor]
call fcn.00453dd0
mov ecx, dword [0x4d01e8]
mov dword [0x4d01e0], ecx
call dword [sym.imp.WINMM.dll_joyGetNumDevs]
test eax, eax
je 0x441c27
mov esi, dword [sym.imp.WINMM.dll_joyGetPos]
push 0x4d0039
push ebx
call esi
test eax, eax
jne 0x441c01
push 0x194
push 0x4d0049
mov byte [0x4d0038], bl
push ebx
jmp 0x441c21
push 0x4d0039
push 1
call esi
test eax, eax
jne 0x441c27
push 0x194
push 0x4d0049
mov byte [0x4d0038], 1
push 1
call dword [sym.imp.WINMM.dll_joyGetDevCapsA]
call fcn.004447e0
call fcn.0045b4a0
mov ecx, 7
xor eax, eax
lea edi, [esp + 0x58]
rep stosd dword es:[edi], eax
cmp dword [esp + 0x5c], 0x12
je 0x441e9d
mov ebp, dword [sym.imp.USER32.dll_SendMessageA]
push 1
push ebx
push ebx
lea edx, [esp + 0x64]
push ebx
push edx
call dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
je 0x441c7e
lea eax, [esp + 0x58]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea ecx, [esp + 0x58]
push ecx
call dword [sym.imp.USER32.dll_DispatchMessageA]
jmp 0x441e8b
cmp dword [0x4b9408], ebx
je 0x441e85
mov al, byte [0x4d0038]
cmp al, bl
jl 0x441e6e
movsx eax, al
lea edx, [esp + 0x10]
push edx
push eax
call dword [sym.imp.WINMM.dll_joyGetPos]
mov edi, dword [0x4d0071]
mov eax, dword [0x4d006d]
mov cl, byte [0x4d0045]
mov esi, edi
sub esi, eax
sub edi, eax
mov eax, dword [esp + 0x1c]
shr esi, 1
shr edi, 1
and eax, 1
je 0x441ce1
test cl, 1
jne 0x441ce1
mov ecx, dword [0x4d01e0]
push 0xf
push 0xa
push 0x100
push ecx
jmp 0x441cfa
cmp eax, ebx
jne 0x441d02
test cl, 1
je 0x441d02
mov edx, dword [0x4d01e0]
push 0xf
push 0xa
push 0x101
push edx
call ebp
mov cl, byte [0x4d0045]
mov eax, dword [esp + 0x1c]
and eax, 2
je 0x441d21
test cl, 2
jne 0x441d21
mov eax, dword [0x4d01e0]
push 0xf
push 0xb
push 0x100
push eax
jmp 0x441d3a
cmp eax, ebx
jne 0x441d42
test cl, 2
je 0x441d42
mov ecx, dword [0x4d01e0]
push 0xf
push 0xb
push 0x101
push ecx
call ebp
mov cl, byte [0x4d0045]
mov eax, dword [esp + 0x1c]
and eax, 4
je 0x441d62
test cl, 4
jne 0x441d62
mov edx, dword [0x4d01e0]
push 0xf
push 0xe
push 0x100
push edx
jmp 0x441d7a
cmp eax, ebx
jne 0x441d82
test cl, 4
je 0x441d82
mov eax, dword [0x4d01e0]
push 0xf
push 0xe
push 0x101
push eax
call ebp
mov cl, byte [0x4d0045]
mov eax, dword [esp + 0x1c]
and eax, 8
je 0x441da2
test cl, 8
jne 0x441da2
mov ecx, dword [0x4d01e0]
push 0xf
push 0xf
push 0x100
push ecx
jmp 0x441dbb
cmp eax, ebx
jne 0x441dbd
test cl, 8
je 0x441dbd
mov edx, dword [0x4d01e0]
push 0xf
push 0xf
push 0x101
push edx
call ebp
mov eax, dword [esp + 0x10]
lea ecx, [esi + esi*4]
sub eax, esi
push 0x3a
lea ecx, [ecx + ecx*8]
push 0x3b
lea eax, [eax + eax*4]
shl ecx, 1
lea eax, [eax + eax*4]
shl eax, 2
cdq
idiv ecx
lea ecx, [esi + esi*2]
shl ecx, 5
sub ecx, esi
push eax
mov eax, dword [0x4d0039]
sub eax, esi
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 2
cdq
idiv ecx
mov ecx, 0x4d0038
push eax
call fcn.00441f20
lea ecx, [edi + edi*4]
push 0x3d
mov eax, dword [esp + 0x18]
push 0x3c
sub eax, edi
lea ecx, [ecx + ecx*8]
shl ecx, 1
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 2
cdq
idiv ecx
lea ecx, [edi + edi*2]
shl ecx, 5
sub ecx, edi
push eax
mov eax, dword [0x4d003d]
sub eax, edi
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 2
cdq
idiv ecx
mov ecx, 0x4d0038
push eax
call fcn.00441f20
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov dword [0x4d0039], edx
mov edx, dword [esp + 0x1c]
mov dword [0x4d003d], eax
mov dword [0x4d0041], ecx
mov dword [0x4d0045], edx
call fcn.0045ba30
test eax, eax
je 0x441e8b
mov eax, dword [0x4d01e8]
push ebx
push ebx
push 0x10
push eax
call ebp
jmp 0x441e8b
call dword [sym.imp.USER32.dll_WaitMessage]
cmp dword [esp + 0x5c], 0x12
jne 0x441c4f
mov ebp, dword [esp + 0x178]
call fcn.0045b900
call fcn.00415350
mov byte [0x4d0038], 0xff
call fcn.00415350
call fcn.00443790
mov eax, dword [0x4d01e8]
cmp eax, ebx
je 0x441ec8
push eax
call dword [sym.imp.USER32.dll_DestroyWindow]
push ebp
push str.WinName
mov dword [0x4d01e8], ebx
call dword [sym.imp.USER32.dll_UnregisterClassA]
mov eax, dword [0x4d01f0]
cmp eax, ebx
je 0x441eea
push eax
call dword [sym.imp.USER32.dll_DestroyCursor]
mov eax, dword [0x4d01f4]
mov dword [0x4d01f0], ebx
cmp eax, ebx
je 0x441f00
push eax
call dword [sym.imp.USER32.dll_DestroyCursor_1]
pop edi
pop esi
mov dword [0x4d01f4], ebx
pop ebp
xor eax, eax
pop ebx
add esp, 0x164
ret 0x10