Function at 0x402c30
Capabilities:
Get common file path
Get system information on windows
Set current directory

Disassembly:
sub esp, 0x600
lea eax, [esp + 0x500]
push ebx
lea ecx, [esp + 0x404]
push esi
lea edx, [esp + 0x308]
push edi
push ebp
push eax
lea eax, [esp + 0x14]
push ecx
push edx
mov ecx, dword [0x406260]
push eax
push ecx
call fcn.00403140
lea ecx, [esp + 0x24]
add esp, 0x14
mov esi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
nop
push ecx
call esi
lea ecx, [esp + 0x310]
push ecx
call esi
push 0x4076e0
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push 0x136
call esi
mov eax, dword [esp + 0x614]
push 0xc8
push 0x407820
mov edi, dword [sym.imp.USER32.dll_LoadStringA]
push 1
mov dword [0x407604], eax
push eax
call edi
push 0xc8
mov ecx, dword [0x407604]
push 0x407420
push 5
push ecx
call edi
push 0xc8
mov eax, dword [0x407604]
push 0x4074f0
push 6
push eax
call edi
push 0xc8
mov eax, dword [0x407604]
push 0x407240
push 7
push eax
call edi
push 0xc8
mov eax, dword [0x407604]
push 0x407170
push 2
push eax
call edi
mov dword [0x4075b8], 0x7f
lea eax, [esp + 0x180]
push 0xc8
push eax
mov ecx, dword [0x407604]
push 0x12
push ecx
call edi
lea ecx, [esp + 0x248]
push 0xc8
push ecx
mov edx, dword [0x407604]
push 0x13
push edx
call edi
lea ecx, [esp + 0x58]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
cmp word [esp + 0x58], 0
jne 0x402d85
mov eax, dword [esp + 0x70]
cmp eax, 0x182
nop
nop
cmp eax, 0x1e6
jmp 0x402d85
mov edi, dword [sym.imp.KERNEL32.dll_GetVersion]
call edi
cmp eax, 0x80000000
jae 0x402d9f
call edi
cmp al, 4
mov eax, 1
jae 0x402da1
xor eax, eax
test eax, eax
jne 0x402dd8
call edi
cmp eax, 0x80000000
jbe 0x402db4
call edi
cmp al, 4
jae 0x402dd8
lea eax, [esp + 0x248]
push 0x2010
push str.Puzzle_Bobble
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push 0
call fcn.00403030
add esp, 4
mov eax, dword [esp + 0x61c]
cmp byte [eax], 0x55
jne 0x402dee
call fcn.00401300
jmp 0x402f77
push str.Puzzle_Bobble
mov edi, dword [sym.imp.USER32.dll_FindWindowA]
push str.Puzzle_Bobble
call edi
test eax, eax
je 0x402e10
push eax
call dword [sym.imp.USER32.dll_SetForegroundWindow]
jmp 0x402f77
push str.Puzzle_Bobble
push str.Loader
call edi
test eax, eax
je 0x402e2c
push eax
call dword [sym.imp.USER32.dll_SetForegroundWindow]
jmp 0x402f77
push 0xc0c0c0
xor edi, edi
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
push 0x7f00
mov dword [0x407608], eax
push edi
call dword [sym.imp.USER32.dll_LoadCursorA]
mov ecx, dword [0x407604]
mov dword [esp + 0x2c], eax
mov eax, 0x406218
and eax, 0xffff
push eax
push ecx
call dword [sym.imp.USER32.dll_LoadIconA]
push 4
mov ebp, dword [sym.imp.GDI32.dll_GetStockObject]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x38], edi
mov dword [esp + 0x3c], str.Loader
call ebp
mov dword [esp + 0x30], eax
mov dword [esp + 0x20], edi
mov eax, dword [0x407604]
lea ecx, [esp + 0x14]
mov dword [esp + 0x24], eax
push ecx
mov dword [esp + 0x18], 3
mov dword [esp + 0x1c], 0x402ac0
mov dword [esp + 0x20], edi
call dword [sym.imp.USER32.dll_RegisterClassA]
push edi
mov ecx, dword [0x407604]
push ecx
push edi
push edi
push 0x32
push 0x32
push 0xa
push 0xa
push 0xcf0000
push str.Puzzle_Bobble
push str.Loader
push edi
call dword [sym.imp.USER32.dll_CreateWindowExA]
lea ecx, [esp + 0x7c]
mov dword [0x407158], eax
push ecx
push 0x104
call esi
lea ecx, [esp + 0x7c]
push ecx
mov eax, dword [0x407158]
lea ecx, [esp + 0x80]
push ecx
push str._lobby
push str.PB.exe
push str.Puzzle_Bobble
push 0x405020
push eax
call fcn.00402f90
add esp, 0x1c
push edi
mov ecx, dword [0x407158]
push edi
push 0x6bc
push ecx
call dword [sym.imp.USER32.dll_PostMessageA]
lea ecx, [esp + 0x3c]
push edi
push edi
mov ebx, dword [sym.imp.USER32.dll_GetMessageA]
push edi
push ecx
call ebx
test eax, eax
je 0x402f6b
mov esi, dword [sym.imp.USER32.dll_TranslateMessage]
mov edi, dword [sym.imp.USER32.dll_DispatchMessageA]
lea eax, [esp + 0x3c]
push eax
call esi
lea eax, [esp + 0x3c]
push eax
call edi
lea eax, [esp + 0x3c]
push 0
push 0
push 0
push eax
call ebx
test eax, eax
jne 0x402f4c
mov eax, dword [0x407608]
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x600
ret 0x10