Function at 0x402ce0
Capabilities:
Check if file exists
Create process on windows
Query environment variable
Read .ini file
Set environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x3c64
call fcn.00403880
mov eax, dword [0x41d004]
xor eax, ebp
mov dword [ebp - 4], eax
push str._WmglLauncher__Start.
call fcn.004023b0
add esp, 4
push 0x400
push 0
lea eax, [ebp - 0x13dc]
push eax
call fcn.00404200
add esp, 0xc
lea ecx, [ebp - 0x3be8]
push ecx
mov ecx, 0x41d970
call fcn.00402ae0
jmp 0x402d41
push 0
lea edx, [ebp - 0x3c18]
push edx
lea ecx, [ebp - 0x3be8]
call fcn.00402380
lea eax, [ebp - 0x3c1c]
push eax
mov ecx, 0x41d970
call fcn.00402b10
push eax
lea ecx, [ebp - 0x3be8]
call fcn.004022c0
movzx ecx, al
test ecx, ecx
je 0x402dfc
lea edx, [ebp - 0x3c20]
push edx
mov ecx, 0x41d970
call fcn.00402ae0
push eax
lea ecx, [ebp - 0x3be8]
call fcn.004022c0
movzx eax, al
test eax, eax
je 0x402da1
push 0x4152a4
lea ecx, [ebp - 0x13dc]
push ecx
call fcn.00406fba
add esp, 8
xor edx, edx
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x10], edx
mov dword [ebp - 0xc], edx
mov dword [ebp - 8], edx
lea ecx, [ebp - 0x3be8]
call fcn.00402300
mov eax, dword [eax + 0x24]
mov dword [ebp - 0x3c00], eax
push 0xa
lea ecx, [ebp - 0x24]
push ecx
mov edx, dword [ebp - 0x3c00]
push edx
call fcn.0040729e
add esp, 0xc
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x13dc]
push ecx
call fcn.00406fba
add esp, 8
jmp 0x402d2d
lea edx, [ebp - 0x13dc]
push edx
push 0x4152a8
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push 0x208
push 0
lea eax, [ebp - 0xbcc]
push eax
call fcn.00404200
add esp, 0xc
push 0x208
push 0
lea ecx, [ebp - 0x7bc]
push ecx
call fcn.00404200
add esp, 0xc
push 0x208
push 0
lea edx, [ebp - 0x3ac]
push edx
call fcn.00404200
add esp, 0xc
push 0x208
push 0
lea eax, [ebp - 0x5b4]
push eax
call fcn.00404200
add esp, 0xc
push 0x104
lea ecx, [ebp - 0xbcc]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea edx, [ebp - 0xbcc]
push edx
push str._WmglLauncher__Exe_file_path___s
call fcn.004023b0
add esp, 8
lea eax, [ebp - 0xbcc]
push eax
lea ecx, [ebp - 0x7bc]
push ecx
call fcn.004021e0
add esp, 8
push 0x5c
lea edx, [ebp - 0x7bc]
push edx
call fcn.00402b80
add esp, 8
xor ecx, ecx
mov word [eax], cx
lea edx, [ebp - 0x7bc]
push edx
push str._WmglLauncher__szRunDir___s
call fcn.004023b0
add esp, 8
mov dword [ebp - 0x3bec], 0xffffffff
push 0x208
push 0
lea eax, [ebp - 0x9c4]
push eax
call fcn.00404200
add esp, 0xc
push 0x104
lea ecx, [ebp - 0x9c4]
push ecx
lea edx, [ebp - 0x7bc]
push edx
call fcn.00402440
add esp, 0xc
movzx eax, al
test eax, eax
je 0x4030a5
lea ecx, [ebp - 0x9c4]
push ecx
push 0x415348
lea edx, [ebp - 0x3ac]
push edx
call fcn.00402160
add esp, 0xc
push 0x80
push 0
lea eax, [ebp - 0xa4]
push eax
call fcn.00404200
add esp, 0xc
lea ecx, [ebp - 0x3ac]
push ecx
push 0x40
lea edx, [ebp - 0xa4]
push edx
push 0x415374
push 0x415378
push 0x415388
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0x3ac]
push eax
push 0xffffffffffffffff
push 0x415398
push 0x4153a8
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [ebp - 0x3bec], eax
lea ecx, [ebp - 0x3ac]
push ecx
lea edx, [ebp - 0xa4]
push edx
push str._WmglLauncher__Find_Patcher___s__in_dir__s_
call fcn.004023b0
add esp, 0xc
push 0x80
push 0
lea eax, [ebp - 0x124]
push eax
call fcn.00404200
add esp, 0xc
lea ecx, [ebp - 0x3ac]
push ecx
push 0
push 0x415414
push 0x415424
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
test eax, eax
jbe 0x403081
lea edx, [ebp - 0x3ac]
push edx
push 0
push str.Partner
push 0x415444
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
cmp eax, 0x7b
je 0x403081
lea eax, [ebp - 0x3ac]
push eax
push 0x40
lea ecx, [ebp - 0x124]
push ecx
push 0x415454
push str.Client
push 0x415468
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
push 0x208
push 0
lea edx, [ebp - 0xfdc]
push edx
call fcn.00404200
add esp, 0xc
lea eax, [ebp - 0x124]
push eax
lea ecx, [ebp - 0x9c4]
push ecx
push 0x415478
lea edx, [ebp - 0xfdc]
push edx
call fcn.00402160
add esp, 0x10
lea eax, [ebp - 0xfdc]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x403081
lea ecx, [ebp - 0x124]
push ecx
lea edx, [ebp - 0xa4]
push edx
call fcn.00402200
add esp, 8
lea eax, [ebp - 0xa4]
push eax
lea ecx, [ebp - 0x9c4]
push ecx
push 0x415484
lea edx, [ebp - 0x5b4]
push edx
call fcn.00402160
add esp, 0x10
jmp 0x4030ba
push str._WmglLauncher__Patcher_file_info_not_found__abnormal_quit.
call fcn.004023b0
add esp, 4
or eax, 0xffffffff
jmp 0x4034a8
lea eax, [ebp - 0x5b4]
push eax
push str._WmglLauncher__szRepairFilePath_s
call fcn.004023b0
add esp, 8
mov ecx, dword [str._launcher]
mov dword [ebp - 0x3bdc], ecx
mov edx, dword [0x415554]
mov dword [ebp - 0x3bd8], edx
mov eax, dword [0x415558]
mov dword [ebp - 0x3bd4], eax
mov ecx, dword [0x41555c]
mov dword [ebp - 0x3bd0], ecx
mov edx, dword [0x415560]
mov dword [ebp - 0x3bcc], edx
mov ax, word [0x415564]
mov word [ebp - 0x3bc8], ax
push 0x1fea
push 0
lea ecx, [ebp - 0x3bc6]
push ecx
call fcn.00404200
add esp, 0xc
mov dword [ebp - 0x3be0], 0
jmp 0x403147
mov edx, dword [ebp - 0x3be0]
add edx, 1
mov dword [ebp - 0x3be0], edx
call fcn.004072ec
mov ecx, dword [ebp - 0x3be0]
cmp ecx, dword [eax]
jge 0x40322b
cmp dword [ebp - 0x3be0], 0
jne 0x403189
lea edx, [ebp - 0xbcc]
push edx
call fcn.004072f2
mov eax, dword [eax]
mov ecx, dword [ebp - 0x3be0]
mov edx, dword [eax + ecx*4]
push edx
call fcn.004070ea
add esp, 8
test eax, eax
jne 0x403189
jmp 0x403138
push 0x20
call fcn.004072f2
mov eax, dword [eax]
mov ecx, dword [ebp - 0x3be0]
mov edx, dword [eax + ecx*4]
push edx
call fcn.00402b60
add esp, 8
test eax, eax
je 0x4031f2
push 0x415568
lea eax, [ebp - 0x3bdc]
push eax
call fcn.004021c0
add esp, 8
call fcn.004072f2
mov ecx, dword [eax]
mov edx, dword [ebp - 0x3be0]
mov eax, dword [ecx + edx*4]
push eax
lea ecx, [ebp - 0x3bdc]
push ecx
call fcn.004021c0
add esp, 8
push 0x41556c
lea edx, [ebp - 0x3bdc]
push edx
call fcn.004021c0
add esp, 8
jmp 0x403212
call fcn.004072f2
mov eax, dword [eax]
mov ecx, dword [ebp - 0x3be0]
mov edx, dword [eax + ecx*4]
push edx
lea eax, [ebp - 0x3bdc]
push eax
call fcn.004021c0
add esp, 8
push 0x415570
lea ecx, [ebp - 0x3bdc]
push ecx
call fcn.004021c0
add esp, 8
jmp 0x403138
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
call fcn.004025e0
add esp, 4
mov dword [ebp - 0x3bf4], eax
cmp dword [ebp - 0x3bf4], 0xffffffff
je 0x403308
mov edx, dword [ebp - 0x3bf4]
mov dword [ebp - 0x3bf0], edx
mov eax, dword [ebp - 0x3bf0]
xor eax, dword [ebp - 0x3bec]
mov dword [ebp - 0x3bf0], eax
push 0x208
push 0
lea ecx, [ebp - 0xdd4]
push ecx
call fcn.00404200
add esp, 0xc
push 0x80
push 0
lea edx, [ebp - 0x1a4]
push edx
call fcn.00404200
add esp, 0xc
push 0xa
lea eax, [ebp - 0x1a4]
push eax
mov ecx, dword [ebp - 0x3bec]
push ecx
call fcn.0040729e
add esp, 0xc
push 0x104
lea edx, [ebp - 0xdd4]
push edx
lea eax, [ebp - 0x1a4]
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov ecx, 2
imul edx, ecx, 0
movzx eax, word [ebp + edx - 0xdd4]
test eax, eax
jne 0x403308
push 0xa
lea ecx, [ebp - 0xdd4]
push ecx
mov edx, dword [ebp - 0x3bf0]
push edx
call fcn.0040729e
add esp, 0xc
lea eax, [ebp - 0xdd4]
push eax
lea ecx, [ebp - 0x1a4]
push ecx
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push 0x415574
push 0x415578
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea edx, [ebp - 0x3ac]
push edx
push 0
push str.Admin
push 0x4155a4
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
test eax, eax
je 0x403341
mov dword [ebp - 0x3bf8], 1
jmp 0x40334b
mov dword [ebp - 0x3bf8], 0
mov al, byte [ebp - 0x3bf8]
mov byte [ebp - 0x3be1], al
mov dword [ebp - 0x3c04], 0
cmp dword [ebp - 0x3c04], 0x20
ja 0x4034a6
push 1
push 0
lea edx, [ebp - 0x3bdc]
push edx
lea eax, [ebp - 0x5b4]
push eax
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
mov dword [ebp - 0x3bfc], eax
mov ecx, dword [ebp - 0x3bfc]
push ecx
lea edx, [ebp - 0x3bdc]
push edx
lea eax, [ebp - 0x5b4]
push eax
push str._WmglLauncher__ShellExecute__s__szCmdLine_s__return__d
call fcn.004023b0
add esp, 0x10
cmp dword [ebp - 0x3bfc], 0x20
ja 0x403499
push 0x44
push 0
lea ecx, [ebp - 0x3c64]
push ecx
call fcn.00404200
add esp, 0xc
mov dword [ebp - 0x3c64], 0x44
xor edx, edx
mov dword [ebp - 0x3c14], edx
mov dword [ebp - 0x3c10], edx
mov dword [ebp - 0x3c0c], edx
mov dword [ebp - 0x3c08], edx
push 0x800
push 0
lea eax, [ebp - 0x1bdc]
push eax
call fcn.00404200
add esp, 0xc
lea ecx, [ebp - 0x3bdc]
push ecx
lea edx, [ebp - 0x5b4]
push edx
push str.__s___s
lea eax, [ebp - 0x1bdc]
push eax
call fcn.00402190
add esp, 0x10
lea ecx, [ebp - 0x3c14]
push ecx
lea edx, [ebp - 0x3c64]
push edx
push 0
push 0
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x1bdc]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x40347f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x1bdc]
push ecx
push str.CreateProcess_szCmd___s__failed__errno_d
call fcn.004023b0
add esp, 0xc
xor eax, eax
jmp 0x4034a8
mov edx, dword [ebp - 0x3c14]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x3c10]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str._WmglLauncher__Normal_quit_
call fcn.004023b0
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004035f6
mov esp, ebp
pop ebp
ret 0x10