Function at 0x525e20
Capabilities:
Set current directory
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x118
mov eax, dword [0x58829c]
xor eax, esp
mov dword [esp + 0x114], eax
push esi
mov esi, dword [ebp + 8]
lea ecx, [esp + 4]
push edi
sub esp, 8
call fcn.00532dc0
lea eax, [esp + 8]
push eax
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.msvcp120.dll_public:_static_class_std::locale___cdecl_std::locale::global_class_std::locale_const__]
mov ecx, dword [esp + 0x14]
add esp, 8
test ecx, ecx
je 0x525e77
mov eax, dword [ecx]
call dword [eax + 8]
test eax, eax
je 0x525e77
mov edx, dword [eax]
mov ecx, eax
push 1
call dword [edx]
push 0x104
lea eax, [esp + 0x14]
push eax
push esi
call dword [sym.imp.kernel32.dll_GetModuleFileNameA]
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.shlwapi.dll_PathRemoveFileSpecA]
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.kernel32.dll_SetCurrentDirectoryA]
push 0x180
call dword [sym.imp.hge.dll_hgeCreate]
mov esi, dword [sym.imp.msvcr120.dll_void____cdecl_operator_new_unsigned_int_]
mov ecx, eax
mov dword [0x58d454], ecx
mov dword [ecx + 0x844], 0x5754a8
mov eax, dword [0x58d464]
test eax, eax
jne 0x525eee
push 0x14f48
call esi
add esp, 4
test eax, eax
je 0x525ee1
mov ecx, eax
call fcn.00538cc0
jmp 0x525ee3
xor eax, eax
mov ecx, dword [0x58d454]
mov dword [0x58d464], eax
mov dword [eax + 0x154], ecx
mov ecx, dword [0x58d464]
cmp dword [ecx + 0x14b6c], 0x10
lea eax, [ecx + 0x14b58]
jb 0x525f0b
mov eax, dword [eax]
push eax
add ecx, 0x14b70
call fcn.005374e0
sub esp, 8
call fcn.00539780
test al, al
jne 0x525f2b
push 0
call dword [sym.imp.msvcr120.dll_exit]
call fcn.005262a0
test eax, eax
jne 0x525f4c
push 0x10
push str.Error
push str.Cannot_initialize_engine.
push eax
call dword [sym.imp.user32.dll_MessageBoxW]
jmp 0x526257
call fcn.00539470
call fcn.00532c20
mov ecx, dword [0x588fe4]
mov eax, dword [0x58d438]
push 0x24
mov dword [ecx + 0x24], eax
call esi
add esp, 4
test eax, eax
je 0x525f7a
mov ecx, eax
call fcn.004c9400
mov ecx, eax
jmp 0x525f7c
xor ecx, ecx
mov eax, dword [0x58d464]
push 0x38c
mov dword [eax + 0x5c], ecx
call esi
add esp, 4
test eax, eax
je 0x525f9d
mov ecx, eax
call fcn.004c7380
mov ecx, eax
jmp 0x525f9f
xor ecx, ecx
mov eax, dword [0x58d464]
push 4
mov dword [eax + 0x54], ecx
call esi
mov ecx, eax
add esp, 4
test ecx, ecx
je 0x525fbc
mov dword [ecx], 0x56aaf8
jmp 0x525fbe
xor ecx, ecx
mov eax, dword [0x58d464]
sub esp, 8
mov dword [eax + 0x58], ecx
mov ecx, dword [0x58d464]
mov eax, dword [0x58d454]
mov dword [ecx + 0x154], eax
mov ecx, dword [0x58d464]
mov ecx, dword [ecx + 0x5c]
call fcn.004c94d0
push 8
push str.japanese
push dword [0x588404]
mov ecx, 0x5883f4
push 0
call fcn.00405ba0
test eax, eax
jne 0x52600e
push 1
push str.resources_level1_jpn.res
jmp 0x526067
push 7
push str.russian
push dword [0x588404]
mov ecx, 0x5883f4
push 0
call fcn.00405ba0
test eax, eax
je 0x526060
push str.polish
push 0x5883f4
call fcn.00413940
add esp, 8
test al, al
jne 0x526060
push str.czech
push 0x5883f4
call fcn.00413940
add esp, 8
test al, al
jne 0x526060
push 1
push str.resources_level1_en.res
jmp 0x526067
push 1
push str.resources_level1_ru.res
mov ecx, dword [0x588fe4]
call fcn.00542bb0
mov eax, dword [0x58d464]
mov ecx, dword [eax + 0x148]
cmp dword [ecx + 0x6c], 0x10
lea eax, [ecx + 0x58]
jb 0x526088
mov eax, dword [eax]
push eax
call fcn.00524a60
push 0x40c
call esi
add esp, 4
test eax, eax
je 0x5260a7
mov ecx, eax
call fcn.005334c0
mov ecx, eax
jmp 0x5260a9
xor ecx, ecx
mov eax, dword [0x58d464]
push ecx
push str.sm_Mahjong_Menu
mov dword [eax + 0x14b90], ecx
mov ecx, dword [0x58d464]
mov ecx, dword [ecx + 0x14514]
call fcn.00533090
mov ecx, dword [0x58d464]
push str.sm_Mahjong_Menu
mov ecx, dword [ecx + 0x14b90]
push ecx
mov dword [ecx + 0xec], eax
mov eax, dword [0x58d464]
mov eax, dword [eax + 0x14b90]
push dword [eax + 0xec]
add eax, 4
push eax
call fcn.00535da0
mov ecx, dword [0x58d464]
push str.sm_Mahjong_Menu
mov ecx, dword [ecx + 0x14b90]
call fcn.00535e30
mov edi, eax
test edi, edi
je 0x526138
mov ecx, edi
call fcn.00533360
test al, al
jne 0x526138
cmp byte [0x58d45c], al
je 0x526138
push 1
push ecx
mov ecx, dword [edi + 0xc]
push edi
call fcn.00533230
push ecx
mov ecx, dword [0x58d464]
push str.sm_window_appear
mov ecx, dword [ecx + 0x14510]
call fcn.00533090
mov ecx, dword [0x58d464]
push str.sm_window_appear
mov ecx, dword [ecx + 0x14b90]
push ecx
mov dword [ecx + 0xbc], eax
mov eax, dword [0x58d464]
mov eax, dword [eax + 0x14b90]
push dword [eax + 0xbc]
add eax, 4
push eax
call fcn.00535da0
cmp byte [0x58d45c], 0
mov eax, dword [0x58d464]
mov ecx, dword [eax + 0x14508]
mov edi, dword [eax + 0x14514]
je 0x5261d6
movd xmm0, ecx
mov dword [edi + 0x1c], ecx
cvtdq2ps xmm0, xmm0
movss dword [edi + 0x20], xmm0
movss dword [edi + 0x24], xmm0
test ecx, ecx
jle 0x5261c2
call sub.msvcr120.dll___libm_sse2_log10f
mulss xmm0, dword [0x577790]
jmp 0x5261c5
xorps xmm0, xmm0
cvttss2si eax, xmm0
push eax
push dword [edi + 0x18]
call dword [sym.imp.Squall.dll_SQUALL_ChannelGroup_SetVolume]
add esp, 8
push 0x64
call esi
add esp, 4
test eax, eax
je 0x5261ea
mov ecx, eax
call fcn.0053e820
jmp 0x5261ec
xor eax, eax
push 0x98
mov dword [0x58d44c], eax
call esi
add esp, 4
test eax, eax
je 0x526208
mov ecx, eax
call fcn.0053d730
jmp 0x52620a
xor eax, eax
mov dword [0x58d450], eax
call fcn.0053e9e0
mov ecx, dword [0x58d450]
mov eax, dword [ecx]
call dword [eax + 0x10]
mov eax, dword [0x58d454]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x14]
mov ecx, dword [0x58d464]
cmp dword [ecx + 0x144dc], 0x19
mov ecx, dword [ecx + 0x54]
jne 0x52624d
cmp byte [ecx + 0x370], 0
jne 0x526252
push ecx
call fcn.004c80b0
jmp 0x526252
call fcn.004c7d50
call fcn.005275f0
mov ecx, dword [esp + 8]
test ecx, ecx
je 0x526270
mov eax, dword [ecx]
call dword [eax + 8]
test eax, eax
je 0x526270
mov edx, dword [eax]
mov ecx, eax
push 1
call dword [edx]
mov ecx, dword [esp + 0x11c]
xor eax, eax
pop edi
pop esi
xor ecx, esp
call fcn.00551c1f
mov esp, ebp
pop ebp
ret 0x10