Function at 0x4074c0
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x44b593
mov eax, dword fs:[0]
push eax
sub esp, 0x4b0
mov eax, dword [0x465ac0]
xor eax, esp
mov dword [esp + 0x4a8], eax
push ebx
push esi
push edi
mov eax, dword [0x465ac0]
xor eax, esp
push eax
lea eax, [esp + 0x4c0]
mov dword fs:[0], eax
lea eax, [esp + 0x24]
push eax
mov ebx, ecx
mov dword [esp + 0x28], 8
mov dword [esp + 0x2c], 0xff
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
mov ecx, ebx
call fcn.0041cb68
xor edi, edi
push edi
call fcn.0041dce1
add esp, 4
lea ecx, [esp + 0x20]
push ecx
mov dword [esp + 0x24], edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov esi, 1
cmp dword [0x4691e0], esi
jle 0x407585
mov edx, dword [eax + 4]
push edx
push 0x458734
call fcn.004312c1
add esp, 8
test eax, eax
jne 0x407585
push str.server_uninstall
mov ecx, 0x457c84
call fcn.0040cd20
mov ecx, eax
call fcn.0040cdd0
mov dword [ebx + 0xa4], esi
jmp 0x4075de
push str.Globalce12caee_0ad3_435a_aea2_21b4d4786288
push edi
push edi
push edi
call dword [sym.imp.KERNEL32.dll_CreateEventW]
cmp eax, edi
je 0x4075c2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4075c2
push str.uninstall_already_run
mov ecx, 0x457c84
call fcn.0040cd20
mov ecx, eax
call fcn.0040cf70
add esp, 4
jmp 0x407b8a
push str.client_uninstall
mov ecx, 0x457c84
call fcn.0040cd20
mov ecx, eax
call fcn.0040cdd0
mov dword [ebx + 0xa4], edi
add esp, 4
call fcn.0040d560
mov edx, dword [eax]
lea esi, [ebx + 0x194]
mov ecx, eax
mov eax, dword [edx + 0x10]
push esi
mov dword [esp + 0x1c], esi
call eax
test eax, eax
je 0x40772c
xor eax, eax
mov ecx, 1
mov dword [esp + 0x122], eax
mov dword [esp + 0x126], eax
mov dword [esp + 0x12a], eax
mov dword [esp + 0x12e], eax
mov dword [esp + 0x132], eax
mov dword [esp + 0x136], eax
mov dword [esp + 0x13a], eax
mov dword [esp + 0x13e], eax
mov dword [esp + 0x142], eax
mov dword [esp + 0x146], eax
mov word [esp + 0x120], cx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [esp + 0x122], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push 0x206
mov dword [esp + 0x12a], eax
lea eax, [esp + 0x2b2]
xor edx, edx
push edi
push eax
mov word [esp + 0x2b8], dx
call fcn.00435330
add esp, 0xc
push 0x104
lea ecx, [esp + 0x2b0]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea edx, [esp + 0x12a]
push edx
lea edi, [esp + 0x2b0]
call fcn.0040f6b0
mov edx, dword [esi]
push 0
lea eax, [esp + 0x20]
push eax
push 0
push 0
push 0x2a
lea ecx, [esp + 0x134]
push ecx
push 0x222218
push edx
mov dword [esp + 0x3c], 0
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x40770c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
je 0x40770c
push str.Fail_to_auth
mov ecx, 0x457c84
call fcn.0040cd20
mov ecx, eax
call fcn.0040cea0
add esp, 4
call fcn.0040d560
mov edi, dword [eax]
mov dword [esp + 0x14], eax
add edi, 0x30
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, dword [esp + 0x14]
mov edx, dword [edi]
push eax
mov eax, dword [esi]
push eax
call edx
lea esi, [ebx + 0xa8]
call fcn.00401040
test eax, eax
jne 0x407759
push str.init_db_failed
mov ecx, 0x457c84
call fcn.0040cd20
mov ecx, eax
call fcn.0040cea0
add esp, 4
jmp 0x407b20
mov ecx, dword [esi]
test ecx, ecx
jne 0x40777d
push str.null_udb
mov ecx, 0x457c84
call fcn.0040cd20
mov ecx, eax
call fcn.0040cea0
add esp, 4
jmp 0x40791a
mov eax, dword [ecx]
mov eax, dword [eax + 0x164]
lea edx, [ebx + 0xc0]
push edx
push str.ServerIP
call eax
test eax, eax
je 0x40791a
xor ecx, ecx
push 0x62
push ecx
lea edx, [esp + 0x24e]
push edx
mov word [esp + 0x250], cx
call fcn.00435330
mov ecx, dword [esi]
add esp, 0xc
test ecx, ecx
jne 0x4077d9
push str.null_udb
mov ecx, 0x457c84
call fcn.0040cd20
mov ecx, eax
call fcn.0040cea0
add esp, 4
jmp 0x4077f4
mov eax, dword [ecx]
mov eax, dword [eax + 0x164]
lea edx, [esp + 0x244]
push edx
push str.ServerPort
call eax
test eax, eax
jne 0x407812
push str.get_ServerPort_failed
mov ecx, 0x457c84
call fcn.0040cd20
mov ecx, eax
call fcn.0040cea0
add esp, 4
jmp 0x40791a
lea ecx, [esp + 0x244]
push ecx
call fcn.0043230e
mov word [ebx + 0xe0], ax
mov ecx, dword [esi]
add esp, 4
test ecx, ecx
jne 0x40784a
push str.null_udb
mov ecx, 0x457c84
call fcn.0040cd20
mov ecx, eax
call fcn.0040cea0
add esp, 4
jmp 0x407864
mov edx, dword [ecx]
mov edx, dword [edx + 0x164]
lea eax, [ebx + 0xe2]
push eax
push str.deviceID
call edx
test eax, eax
jne 0x407882
push str.get_deviceID_failed
mov ecx, 0x457c84
call fcn.0040cd20
mov ecx, eax
call fcn.0040cea0
add esp, 4
jmp 0x40791a
mov ecx, dword [esi]
test ecx, ecx
jne 0x40788f
push str.null_udb
jmp 0x4078d1
mov eax, dword [ecx]
mov eax, dword [eax + 0x164]
lea edx, [ebx + 0x14c]
push edx
push str.Proxy
call eax
test eax, eax
je 0x4078e5
mov ecx, dword [esi]
test ecx, ecx
jne 0x4079b4
push str.null_udb
mov ecx, 0x457c84
call fcn.0040cd20
mov ecx, eax
call fcn.0040cea0
add esp, 4
push str.get_ProxyType_failed
mov ecx, 0x457c84
call fcn.0040cd20
mov ecx, eax
call fcn.0040cea0
add esp, 4
lea ecx, [ebx + 0x180]
push ecx
mov ecx, dword [ebx + 0x148]
lea edx, [ebx + 0x14c]
push edx
lea eax, [ebx + 0x16c]
push eax
push ecx
push str.proxy:_d__s__s:_s
mov ecx, 0x457c84
call fcn.0040cd20
mov ecx, eax
call fcn.0040cdd0
add esp, 0x14
cmp dword [ebx + 0xa4], 0
jne 0x407b1b
mov edi, 7
xor eax, eax
xor edx, edx
mov dword [esp + 0x11c], edi
mov dword [esp + 0x118], eax
mov word [esp + 0x108], dx
mov dword [esp + 0x4c8], eax
lea eax, [esp + 0x104]
push eax
mov eax, 0x46a118
call fcn.004015a0
test eax, eax
je 0x407ac1
lea ecx, [esp + 0x14c]
push ecx
call fcn.00401af0
mov byte [esp + 0x4c8], 1
xor eax, eax
lea edx, [esp + 0x14]
push edx
mov dword [esp + 0x1c8], 1
mov dword [esp + 0x1cc], eax
mov dword [esp + 0x1d0], eax
mov dword [esp + 0x18], 0x401
call fcn.00403940
cmp dword [eax + 0x18], 8
jb 0x407a24
mov eax, dword [eax + 4]
jmp 0x407a27
mov edx, dword [ecx]
mov edx, dword [edx + 0x164]
lea eax, [ebx + 0x16c]
push eax
push str.ProxyType
call edx
test eax, eax
je 0x4078cc
mov ecx, dword [esi]
test ecx, ecx
jne 0x4079fb
push str.null_udb
mov ecx, 0x457c84
call fcn.0040cd20
mov ecx, eax
call fcn.0040cea0
add esp, 4
push str.get_ProxyPort_failed
jmp 0x4078d1
mov eax, dword [ecx]
mov eax, dword [eax + 0x164]
lea edx, [ebx + 0x180]
push edx
push str.ProxyPort
call eax
test eax, eax
je 0x4079f1
mov dword [ebx + 0x148], 1
jmp 0x4078e5
add eax, 4
push ecx
mov ecx, esp
mov dword [esp + 0x18], esp
push eax
call fcn.00402e60
lea eax, [esp + 0x150]
push eax
call fcn.00401cf0
lea ecx, [esp + 0x14c]
call fcn.00414d06
cmp eax, 1
je 0x407aab
mov ebx, dword [esp + 0x18]
cmp dword [ebx], 0xffffffff
je 0x407a86
call fcn.0040d560
mov edi, eax
mov esi, dword [edi]
add esi, 0x34
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, dword [ebx]
mov edx, dword [esi]
push eax
push ecx
mov ecx, edi
call edx
mov eax, dword [ebx]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebx], 0xffffffff
lea ecx, [esp + 0x14c]
mov byte [esp + 0x4c8], 0
call fcn.00401bd0
lea esi, [esp + 0x104]
call fcn.00401650
jmp 0x407b8a
lea ecx, [esp + 0x14c]
mov byte [esp + 0x4c8], 0
call fcn.00401bd0
jmp 0x407ada
push str.query_user_failed
mov ecx, 0x457c84
call fcn.0040cd20
mov ecx, eax
call fcn.0040cea0
add esp, 4
mov dword [esp + 0x4c8], 0xffffffff
cmp dword [esp + 0x11c], 8
jb 0x407aff
mov ecx, dword [esp + 0x108]
push ecx
call fcn.0041455c
add esp, 4
xor edx, edx
mov dword [esp + 0x11c], edi
mov dword [esp + 0x118], 0
mov word [esp + 0x108], dx
call fcn.00401280
lea eax, [esp + 0x2c]
push eax
call fcn.00407f30
lea ecx, [esp + 0x2c]
mov dword [esp + 0x4c8], 2
mov dword [ebx + 0x20], ecx
call fcn.00414d06
mov ebx, dword [esp + 0x18]
cmp dword [ebx], 0xffffffff
je 0x407b75
call fcn.0040d560
mov edi, eax
mov esi, dword [edi]
add esi, 0x34
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov edx, dword [ebx]
push eax
mov eax, dword [esi]
push edx
mov ecx, edi
call eax
mov ecx, dword [ebx]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebx], 0xffffffff
lea edx, [esp + 0x2c]
push edx
mov dword [esp + 0x4cc], 0xffffffff
call fcn.00407bb0
xor eax, eax
mov ecx, dword [esp + 0x4c0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x4a8]
xor ecx, esp
call fcn.00430e7d
mov esp, ebp
pop ebp
ret