Function at 0x404e00
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x528
xor eax, eax
push esi
push edi
mov byte [esp + 0x18], 0
mov ecx, 0x81
lea edi, [esp + 0x19]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
mov ecx, 0x42
lea edi, [esp + 0x428]
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 0xc]
test eax, eax
mov dword [esp + 0x14], 0
je 0x404e5f
cmp byte [eax], 0
je 0x404e5f
push 0x107
push eax
lea eax, [esp + 0x430]
push eax
call fcn.0040da90
add esp, 0xc
jmp 0x404eab
push 0x107
lea ecx, [esp + 0x42c]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edx, [esp + 0x428]
push 0x5c
push edx
call fcn.0040e380
add esp, 8
test eax, eax
je 0x404e90
mov byte [eax + 1], 0
jmp 0x404eab
mov ax, word [0x41b2f4]
mov cl, byte [0x41b2f6]
mov word [esp + 0x428], ax
mov byte [esp + 0x42a], cl
xor eax, eax
lea ecx, [ecx]
mov cl, byte [esp + eax + 0x428]
mov byte [eax + 0x421720], cl
inc eax
test cl, cl
jne 0x404eb0
mov edi, 0x421720
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x404ec8
mov edx, dword [str.rserv30.exe]
mov eax, dword [0x41b53c]
mov ecx, dword [0x41b540]
mov dword [edi], edx
mov dword [edi + 4], eax
push str.r_server.exe
mov dword [edi + 8], ecx
call fcn.004060b0
add esp, 4
test eax, eax
je 0x405165
mov ecx, 0x13
mov esi, str.SoftwareMicrosoftWindowsCurrentVersionUninstallRemote_Administrator_v2.2
lea edi, [esp + 0x220]
rep movsd dword es:[edi], dword [esi]
lea edx, [esp + 0xc]
push edx
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x18]
push ecx
push str.UninstallString
lea edx, [esp + 0x230]
push edx
push 0x80000002
movsw word es:[edi], word [esi]
mov dword [esp + 0x24], 0x208
call fcn.00409ab0
add esp, 0x18
test eax, eax
jne 0x404f72
mov esi, dword [esp + 0x10]
cmp esi, 1
je 0x404f56
cmp esi, 2
jne 0x404f72
lea eax, [esp + 0x18]
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x404f60
sub eax, edx
cmp eax, 1
jge 0x40504d
xor eax, eax
mov ecx, 0x82
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
mov ecx, 0x13
mov esi, str.SoftwareMicrosoftWindowsCurrentVersionUninstallRemote_Administrator_v2.1
lea edi, [esp + 0x220]
rep movsd dword es:[edi], dword [esi]
lea eax, [esp + 0xc]
push eax
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x18]
push edx
push str.UninstallString
lea eax, [esp + 0x230]
push eax
push 0x80000002
movsw word es:[edi], word [esi]
mov dword [esp + 0x24], 0x208
call fcn.00409ab0
add esp, 0x18
test eax, eax
jne 0x404fee
mov esi, dword [esp + 0x10]
cmp esi, 1
je 0x404fd7
cmp esi, 2
jne 0x404fee
lea eax, [esp + 0x18]
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x404fe0
sub eax, edx
cmp eax, 1
jge 0x40504d
xor eax, eax
mov ecx, 0x82
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
mov ecx, 0x13
mov esi, str.SoftwareMicrosoftWindowsCurrentVersionUninstallRemote_Administrator_v2.0
lea edi, [esp + 0x220]
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0xc]
push ecx
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x18]
push eax
push str.UninstallString
lea ecx, [esp + 0x230]
push ecx
push 0x80000002
movsw word es:[edi], word [esi]
mov dword [esp + 0x24], 0x208
call fcn.00409ab0
add esp, 0x18
test eax, eax
jne 0x4050c0
mov esi, dword [esp + 0x10]
cmp esi, 1
je 0x405057
cmp esi, 2
jne 0x4050c0
lea eax, [esp + 0x18]
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405060
sub eax, edx
test eax, eax
jle 0x4050c0
lea edx, [esp + 0x18]
push 0x25
push edx
call fcn.0040e3c0
add esp, 8
test eax, eax
je 0x4050c0
push 0x208
lea eax, [esp + 0x224]
push eax
lea ecx, [esp + 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
test eax, eax
jle 0x4050c0
cmp eax, 0x208
ja 0x4050c0
xor eax, eax
jmp 0x4050b0
mov cl, byte [esp + eax + 0x220]
mov byte [esp + eax + 0x18], cl
inc eax
test cl, cl
jne 0x4050b0
lea edx, [esp + 0x18]
push 0x3a
push edx
call fcn.0040e380
mov esi, eax
lea eax, [esp + 0x20]
push 0x5c
push eax
call fcn.0040e380
add esp, 0x10
test esi, esi
je 0x405165
test eax, eax
je 0x405165
mov ecx, eax
sub ecx, esi
add ecx, 2
mov edx, ecx
shr ecx, 2
dec esi
lea edi, [esp + 0x220]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x220]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x405112
mov eax, dword [str.r_server.exe]
mov ecx, dword [0x41b52c]
mov edx, dword [0x41b530]
mov dword [edi], eax
mov al, byte [0x41b534]
mov dword [edi + 4], ecx
lea ecx, [esp + 0x220]
push ecx
mov dword [edi + 8], edx
lea edx, [esp + 0x1c]
push str.__s___stop
push edx
mov byte [edi + 0xc], al
call fcn.0040dbb4
push 0xf
push 1
lea eax, [esp + 0x2c]
push eax
push 0
call fcn.004094f0
add esp, 0x1c
push str.rserver3.exe
call fcn.004060b0
add esp, 4
test eax, eax
jne 0x405266
mov ecx, 0x82
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0xc]
push ecx
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x18]
push eax
push str.UninstallString
push str.SoftwareMicrosoftWindowsCurrentVersionUninstallAAD51583_6D43_4444_A1FF_0C8345345526
mov esi, 0x208
push 0x80000002
mov dword [esp + 0x24], esi
call fcn.00409ab0
add esp, 0x18
test eax, eax
jne 0x405275
lea eax, [esp + 0x18]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4051c3
sub eax, edx
test eax, eax
jle 0x405275
xor eax, eax
mov ecx, 0x82
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0xc]
push ecx
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x18]
push eax
push str.InstallLocation
push str.SoftwareMicrosoftWindowsCurrentVersionUninstallAAD51583_6D43_4444_A1FF_0C8345345526
push 0x80000002
mov dword [esp + 0x24], esi
call fcn.00409ab0
add esp, 0x18
test eax, eax
jne 0x405266
mov eax, dword [esp + 0x10]
cmp eax, 1
je 0x40521d
cmp eax, 2
jne 0x405266
lea eax, [esp + 0x18]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405224
sub eax, edx
test eax, eax
jle 0x405266
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x224]
push str.__srserver3.exe___start
push edx
call fcn.0040dbb4
push 0xf
push 1
lea eax, [esp + 0x234]
push eax
push 0
call fcn.004094f0
add esp, 0x1c
test eax, eax
mov dword [esp + 0x14], eax
jne 0x40526b
call fcn.00404bc0
mov eax, dword [esp + 0x14]
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push 0x421720
lea ecx, [esp + 0x224]
push str.__s___S__v_qn
push ecx
call fcn.0040dbb4
push 0x2d
push 1
lea edx, [esp + 0x234]
push edx
push 0
call fcn.004094f0
add esp, 0x1c
mov dword [0x42171c], 1
call fcn.00404bc0
mov eax, dword [esp + 0x14]
pop edi
pop esi
mov esp, ebp
pop ebp
ret