Function at 0x404990
Capabilities:
Accept command line arguments
Get common file path
Get file attributes
Set current directory
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x530d32
mov eax, dword fs:[0]
push eax
mov eax, 0x330c
call fcn.005070d0
mov eax, dword [0x656c90]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x327c], edi
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
mov ecx, edi
call fcn.00412625
xor ebx, ebx
push ebx
call fcn.00413f1e
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov esi, eax
mov dword [ebp - 0x3278], esi
cmp esi, ebx
je 0x4053b5
push 0x3ff
lea eax, [ebp - 0xe63]
push ebx
push eax
mov byte [ebp - 0xe64], bl
call fcn.00506060
lea ecx, [ebp - 0xe64]
push ecx
push 0x540b88
push esi
call fcn.0052264e
add esp, 0x18
test al, al
je 0x404a96
push 0x40
push 0x540b7c
push 0x540b6c
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 1
jne 0x405163
mov ecx, edi
call fcn.00404900
push ebx
push ebx
push ebx
lea ecx, [ebp - 0x264]
call fcn.00405630
lea edx, [ebp - 0x264]
mov ecx, edx
mov dword [ebp - 4], ebx
mov dword [edi + 0x20], edx
call fcn.004084b4
lea ecx, [ebp - 0x1c8]
mov dword [ebp - 4], 1
call fcn.00412c35
lea ecx, [ebp - 0x264]
mov dword [ebp - 4], 0xffffffff
call fcn.00407d00
jmp 0x405163
lea eax, [ebp - 0xe64]
push eax
push 0x540b68
push esi
call fcn.0052264e
add esp, 0xc
test al, al
je 0x404bc4
call fcn.00401170
test eax, eax
jne 0x4053b5
lea ecx, [ebp - 0x664]
push ecx
call fcn.00520038
lea eax, [ebp - 0x664]
or edi, 0xffffffff
add esp, 4
add eax, edi
lea ebx, [ebx]
mov cl, byte [eax + 1]
inc eax
cmp cl, bl
jne 0x404ae0
mov edx, dword [str.reg.tag]
mov ecx, dword [0x540b64]
mov dword [eax], edx
lea edx, [ebp - 0x664]
push edx
mov dword [eax + 4], ecx
call fcn.0051eed8
add esp, 4
test eax, eax
jne 0x4053b5
lea eax, [ebp - 0x664]
push eax
call fcn.00520038
lea eax, [ebp - 0x664]
add esp, 4
add eax, edi
mov cl, byte [eax + 1]
inc eax
cmp cl, bl
jne 0x404b27
mov ecx, dword [str.server_]
mov edx, dword [0x540b5c]
mov dword [eax], ecx
mov dword [eax + 4], edx
lea eax, [ebp - 0x664]
add eax, edi
mov cl, byte [eax + 1]
inc eax
cmp cl, bl
jne 0x404b48
mov ecx, dword [str.reg.tag]
mov edx, dword [0x540b64]
mov dword [eax], ecx
mov dword [eax + 4], edx
lea eax, [ebp - 0x664]
push eax
call fcn.0051eed8
add esp, 4
test eax, eax
je 0x404b7e
mov eax, 1
jmp 0x4053b7
push ebx
push 0x53ff36
push ebx
lea ecx, [ebp - 0x11dc]
call fcn.004076b0
lea ecx, [ebp - 0x11dc]
mov dword [ebp - 4], 2
call fcn.004084b4
mov dword [ebp - 4], edi
lea ecx, [ebp - 0x11dc]
cmp eax, 1
je 0x404bba
call fcn.00406f80
jmp 0x4053b5
call fcn.00406f80
jmp 0x405163
lea ecx, [ebp - 0xe64]
push ecx
push 0x540b54
push esi
call fcn.0052264e
add esp, 0xc
test al, al
je 0x405163
push str.Global4A354D3B_C50C_457a_873D_D2F66576EE67
mov edi, 1
call fcn.0051fe8e
add esp, 4
test eax, eax
jne 0x4053b5
push str.SOFTWARERZXENTERPRISE
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.005223aa
lea edx, [ebp - 0xa64]
push edx
call fcn.00520038
add esp, 0xc
lea eax, [ebp - 0xa64]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
or eax, 2
push eax
lea ecx, [ebp - 0xa64]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea edx, [ebp - 0x258]
push edx
push 0x103
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea eax, [ebp - 0xa64]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea eax, [ebp - 0xa64]
dec eax
lea ecx, [ecx]
mov cl, byte [eax + 1]
inc eax
cmp cl, bl
jne 0x404c60
mov ecx, dword [str.client.exe]
mov edx, dword [0x540b04]
mov dword [eax], ecx
mov cx, word [0x540b08]
mov dword [eax + 4], edx
mov dl, byte [0x540b0a]
mov word [eax + 8], cx
mov byte [eax + 0xa], dl
lea eax, [ebp - 0xa64]
push eax
call fcn.0051eed8
add esp, 4
test eax, eax
jne 0x404d01
lea ecx, [ebp - 0xa64]
push ecx
call fcn.00520038
lea eax, [ebp - 0xa64]
add esp, 4
dec eax
mov cl, byte [eax + 1]
inc eax
cmp cl, bl
jne 0x404cb6
mov edx, dword [str.server.exe]
mov ecx, dword [0x540af8]
mov dword [eax], edx
mov dx, word [0x540afc]
mov dword [eax + 4], ecx
mov cl, byte [0x540afe]
mov word [eax + 8], dx
lea edx, [ebp - 0xa64]
push edx
mov byte [eax + 0xa], cl
call fcn.0051eed8
add esp, 4
test eax, eax
je 0x4053b5
call fcn.00404520
xor edi, edi
lea eax, [ebp - 0xa64]
push eax
lea ecx, [ebp - 0x3264]
push str.__s___y
push ecx
call fcn.005075df
push ebx
push ebx
push 0x40
lea edx, [ebp - 0x3264]
push 1
push edx
call fcn.0052008a
add esp, 0x20
call fcn.00404450
cmp edi, ebx
je 0x405151
push ebx
call fcn.00403c40
add esp, 4
call fcn.00404240
call fcn.004079a0
test al, al
je 0x404e0a
push 0x7fe
lea ecx, [ebp - 0x2e62]
xor eax, eax
push ebx
push ecx
mov word [ebp - 0x2e64], ax
call fcn.00506060
add esp, 0xc
push 0x400
lea edx, [ebp - 0x2e64]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x2e64]
push 0x5c
push eax
call fcn.00507b76
add esp, 8
cmp eax, ebx
je 0x404da2
xor ecx, ecx
mov word [eax + 2], cx
xor eax, eax
jmp 0x404db0
movzx ecx, word [ebp + eax - 0x2e64]
mov word [ebp + eax - 0x1664], cx
add eax, 2
cmp cx, bx
jne 0x404db0
lea edi, [ebp - 0x1664]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
cmp ax, bx
jne 0x404dd1
mov ecx, 7
mov esi, str.RzxClient.exe
rep movsd dword es:[edi], dword [esi]
lea edx, [ebp - 0x1664]
push 0x540ab8
push edx
movsw word es:[edi], word [esi]
call fcn.00407b50
add esp, 8
call fcn.00407a60
mov esi, dword [ebp - 0x3278]
push 0x3ff
lea eax, [ebp - 0x663]
push ebx
push eax
mov byte [ebp - 0x664], bl
call fcn.00506060
lea ecx, [ebp - 0x664]
push ecx
push 0x540ab4
push esi
call fcn.0052264e
add esp, 0x18
test al, al
je 0x404f28
lea edx, [ebp - 0x664]
push edx
call fcn.0051f045
lea eax, [ebp - 0x664]
add esp, 4
dec eax
mov cl, byte [eax + 1]
inc eax
cmp cl, bl
jne 0x404e55
mov ecx, dword [str._server]
mov edx, dword [0x540ab0]
lea edi, [ebp - 0x664]
mov dword [eax], ecx
mov dword [eax + 4], edx
dec edi
mov al, byte [edi + 1]
inc edi
cmp al, bl
jne 0x404e75
mov ax, word [0x54065c]
lea ecx, [ebp - 0x664]
push ecx
lea edx, [ebp - 0x2a64]
push str._sreg.tag
push edx
mov word [edi], ax
call fcn.005075df
lea eax, [ebp - 0x2a64]
push eax
call fcn.0051eed8
add esp, 0x10
lea ecx, [ebp - 0x664]
test eax, eax
je 0x404ef5
push ecx
lea edx, [ebp - 0x3274]
push edx
call fcn.004040e0
push 0x3f
lea eax, [ebp - 0x4f]
push ebx
push eax
mov byte [ebp - 0x50], bl
call fcn.00506060
lea ecx, [ebp - 0x50]
push ecx
lea edx, [ebp - 0x3274]
push 0x10
push edx
call fcn.00521d28
lea eax, [ebp - 0x50]
push 1
push eax
call fcn.00406c30
add esp, 0x28
jmp 0x404f28
push ebx
push ecx
push 1
lea ecx, [ebp - 0x11dc]
call fcn.004076b0
lea ecx, [ebp - 0x11dc]
mov dword [ebp - 4], 3
call fcn.004084b4
lea ecx, [ebp - 0x11dc]
mov dword [ebp - 4], 0xffffffff
call fcn.00406f80
mov ecx, dword [ebp - 0x327c]
call fcn.00404880
lea edx, [ebp - 0xa64]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
or eax, 2
push eax
lea eax, [ebp - 0xa64]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push 0x3ff
lea ecx, [ebp - 0x2663]
push ebx
push ecx
mov byte [ebp - 0x2664], bl
call fcn.00506060
push 0x3ff
lea edx, [ebp - 0x2263]
push ebx
push edx
mov byte [ebp - 0x2264], bl
call fcn.00506060
push 0x3ff
lea eax, [ebp - 0x1e63]
push ebx
push eax
mov byte [ebp - 0x1e64], bl
call fcn.00506060
push 0x3ff
lea ecx, [ebp - 0x1a63]
push ebx
push ecx
mov byte [ebp - 0x1a64], bl
call fcn.00506060
lea edx, [ebp - 0x2664]
push edx
push 0x540a9c
push esi
call fcn.0052264e
lea eax, [ebp - 0x2264]
push eax
push str._wip
push esi
call fcn.0052264e
add esp, 0x48
lea ecx, [ebp - 0x1e64]
push ecx
push str._port
push esi
call fcn.0052264e
lea edx, [ebp - 0x1a64]
push edx
push 0x540ab4
push esi
call fcn.0052264e
add esp, 0x18
cmp byte [ebp - 0x2664], bl
je 0x405036
cmp byte [ebp - 0x1e64], bl
je 0x405036
cmp byte [ebp - 0x2264], bl
je 0x405036
lea eax, [ebp - 0x1e64]
push eax
lea ecx, [ebp - 0x2264]
push ecx
lea edx, [ebp - 0x2664]
push edx
call fcn.00402b50
add esp, 0xc
jmp 0x405066
push ebx
lea ecx, [ebp - 0x3314]
call fcn.004035c0
lea ecx, [ebp - 0x3314]
mov dword [ebp - 4], 4
call fcn.004084b4
lea ecx, [ebp - 0x3314]
mov dword [ebp - 4], 0xffffffff
call fcn.00402fe0
cmp byte [ebp - 0x1a64], bl
je 0x405116
lea eax, [ebp - 0x1a64]
push eax
call fcn.00403f80
add esp, 4
test eax, eax
jne 0x405116
lea ecx, [ebp - 0x1a64]
push ecx
call fcn.00403f80
add esp, 4
test eax, eax
jne 0x405116
push 0x3ff
lea edx, [ebp - 0x1263]
push ebx
push edx
mov byte [ebp - 0x1264], bl
call fcn.00506060
lea eax, [ebp - 0x1264]
push eax
call fcn.00520038
lea eax, [ebp - 0x1264]
add esp, 0x10
dec eax
lea ebx, [ebx]
mov cl, byte [eax + 1]
inc eax
cmp cl, bl
jne 0x4050d0
mov ecx, dword [str.InstallInfomations]
mov edx, dword [0x540a7c]
mov dword [eax], ecx
mov ecx, dword [0x540a80]
mov dword [eax + 4], edx
mov edx, dword [0x540a84]
mov dword [eax + 8], ecx
mov ecx, dword [0x540a88]
mov dword [eax + 0xc], edx
push 1
lea edx, [ebp - 0x1264]
push ebx
push edx
mov dword [eax + 0x10], ecx
call fcn.0051f5fb
add esp, 0xc
call fcn.00403f10
test eax, eax
jne 0x405156
push ebx
lea ecx, [ebp - 0x3318]
call fcn.00401ac0
lea ecx, [ebp - 0x3318]
mov dword [ebp - 4], 5
call fcn.004084b4
lea ecx, [ebp - 0x3318]
mov dword [ebp - 4], 0xffffffff
call fcn.00401b60
jmp 0x405156
call fcn.004046a0
lea eax, [ebp - 0x258]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea ecx, [ebp - 0xe64]
push ecx
push 0x540a74
push esi
mov byte [ebp - 0xe64], bl
call fcn.0052264e
add esp, 0xc
test al, al
je 0x405191
cmp byte [ebp - 0xe64], bl
jne 0x405191
mov esi, 1
jmp 0x405193
xor esi, esi
mov eax, dword [ebp - 0x3278]
lea edx, [ebp - 0xe64]
push edx
push str._start
push eax
call fcn.0052264e
add esp, 0xc
test al, al
jne 0x4051ba
cmp esi, ebx
je 0x4053b5
lea ecx, [ebp - 0x154]
push ecx
call fcn.00520038
lea eax, [ebp - 0x154]
add esp, 4
dec eax
mov cl, byte [eax + 1]
inc eax
cmp cl, bl
jne 0x4051d0
mov edx, dword [str.RzxMon.exe]
mov ecx, dword [0x5408bc]
mov dword [eax], edx
mov dx, word [0x5408c0]
mov dword [eax + 4], ecx
mov cl, byte [0x5408c2]
mov word [eax + 8], dx
lea edx, [ebp - 0x154]
push edx
mov byte [eax + 0xa], cl
call fcn.0051eed8
add esp, 4
test eax, eax
je 0x40535e
xor esi, esi
call fcn.00401170
test eax, eax
je 0x40523e
push ebx
push ebx
push 0x20
push ebx
push str.sc_start_svrmon
call fcn.0052008a
add esp, 0x14
push 0xbb8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x405249
call fcn.00403fc0
mov esi, eax
cmp esi, ebx
jne 0x40525c
push 0x40
push 0x540a50
push 0x5409f0
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
call fcn.00403660
call fcn.00401000
cmp eax, ebx
je 0x405277
mov edx, dword [eax]
push ebx
push ebx
push ebx
mov ecx, eax
mov eax, dword [edx]
push 1
call eax
lea ecx, [ebp - 0x154]
push ecx
call fcn.00520038
lea eax, [ebp - 0x154]
add esp, 4
dec eax
lea ecx, [ecx]
mov cl, byte [eax + 1]
inc eax
cmp cl, bl
jne 0x405290
mov edx, dword [str.RzxTray.exe]
mov ecx, dword [0x54069c]
mov dword [eax], edx
mov edx, dword [0x5406a0]
mov dword [eax + 4], ecx
mov dword [eax + 8], edx
lea eax, [ebp - 0x154]
push eax
call fcn.0051eed8
add esp, 4
test eax, eax
je 0x4052d9
push ebx
push ebx
push 0x20
lea ecx, [ebp - 0x154]
push ebx
push ecx
call fcn.0052008a
add esp, 0x14
cmp esi, ebx
je 0x4053b5
push 0x40
push 0x540a50
push 0x540988
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
lea edx, [ebp - 0x154]
push edx
call fcn.00520038
lea eax, [ebp - 0x154]
add esp, 4
dec eax
lea ebx, [ebx]
mov cl, byte [eax + 1]
inc eax
cmp cl, bl
jne 0x405310
mov ecx, dword [0x540974]
mov edx, dword [0x540978]
mov dword [eax], ecx
mov ecx, dword [0x54097c]
mov dword [eax + 4], edx
mov dx, word [0x540980]
mov dword [eax + 8], ecx
mov word [eax + 0xc], dx
lea eax, [ebp - 0x154]
push eax
call fcn.0051eed8
add esp, 4
test eax, eax
je 0x4053b5
push ebx
push ebx
push 0x20
push ebx
lea ecx, [ebp - 0x154]
push ecx
jmp 0x4053ad
lea edx, [ebp - 0x154]
push edx
call fcn.00520038
lea eax, [ebp - 0x154]
add esp, 4
dec eax
mov cl, byte [eax + 1]
inc eax
cmp cl, bl
jne 0x405374
mov ecx, dword [str.SvrMon.exe]
mov edx, dword [0x54096c]
mov dword [eax], ecx
mov cx, word [0x540970]
push ebx
mov dword [eax + 4], edx
mov dl, byte [0x540972]
push ebx
mov word [eax + 8], cx
push 0x20
mov byte [eax + 0xa], dl
push ebx
lea eax, [ebp - 0x154]
push eax
call fcn.0052008a
add esp, 0x14
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00506042
mov esp, ebp
pop ebp
ret