Function at 0x404e80
Capabilities:
Connect network resource
Copy file
Create service
Delete file
Delete service
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x458
mov eax, dword [0x42cf34]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov dword [ebp - 0x424], 0
mov dword [ebp - 0x420], 0
mov dword [ebp - 0x454], 1
mov dword [ebp - 0x448], 0
mov dword [ebp - 0x43c], 0
cmp dword [ebp + 0x1c], 0
je 0x404ee5
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.004048b0
add esp, 0xc
jmp 0x405866
mov eax, dword [ebp + 8]
push eax
push 0x42c168
push 0x104
lea ecx, [ebp - 0x108]
push ecx
call fcn.00402750
add esp, 0x10
cmp eax, 0xffffffff
jne 0x404f39
mov edx, 1
imul eax, edx, 0x103
mov dword [ebp - 0x428], eax
cmp dword [ebp - 0x428], 0x104
jae 0x404f26
jmp 0x404f2b
call fcn.0040722d
mov ecx, dword [ebp - 0x428]
mov byte [ebp + ecx - 0x108], 0
push 1
push 0x105
call fcn.0040a6d4
add esp, 8
mov dword [ebp - 0x424], eax
push 1
push 0x105
call fcn.0040a6d4
add esp, 8
mov dword [ebp - 0x420], eax
push 4
mov edx, dword [ebp + 0x14]
add edx, 3
push edx
call fcn.0040a6d4
add esp, 8
mov dword [ebp - 0x41c], eax
cmp dword [0x431308], 0
je 0x405036
cmp dword [0x431300], 0
je 0x404fa7
mov eax, 4
shl eax, 0
mov ecx, dword [ebp - 0x41c]
mov dword [ecx + eax], 0x42c170
jmp 0x404fbc
mov edx, 4
shl edx, 0
mov eax, dword [ebp - 0x41c]
mov dword [eax + edx], 0x42c174
mov ecx, 4
shl ecx, 1
mov edx, dword [ebp - 0x41c]
mov dword [edx + ecx], 0x42c178
mov eax, 4
imul ecx, eax, 3
mov edx, dword [ebp - 0x41c]
mov eax, dword [ebp + 8]
mov dword [edx + ecx], eax
mov dword [ebp - 0x418], 1
jmp 0x404fff
mov ecx, dword [ebp - 0x418]
add ecx, 1
mov dword [ebp - 0x418], ecx
mov edx, dword [ebp - 0x418]
cmp edx, dword [ebp + 0x14]
jae 0x405028
mov eax, dword [ebp - 0x418]
mov ecx, dword [ebp - 0x41c]
mov edx, dword [ebp - 0x418]
mov esi, dword [ebp + 0x18]
mov edx, dword [esi + edx*4]
mov dword [ecx + eax*4 + 0xc], edx
jmp 0x404ff0
mov eax, dword [ebp + 0x14]
add eax, 3
mov dword [ebp + 0x14], eax
jmp 0x4050e6
cmp dword [0x431300], 0
je 0x4050a3
mov ecx, 4
shl ecx, 0
mov edx, dword [ebp - 0x41c]
mov dword [edx + ecx], 0x42c17c
mov dword [ebp - 0x418], 1
jmp 0x40506f
mov eax, dword [ebp - 0x418]
add eax, 1
mov dword [ebp - 0x418], eax
mov ecx, dword [ebp - 0x418]
cmp ecx, dword [ebp + 0x14]
jae 0x405098
mov edx, dword [ebp - 0x418]
mov eax, dword [ebp - 0x41c]
mov ecx, dword [ebp - 0x418]
mov esi, dword [ebp + 0x18]
mov ecx, dword [esi + ecx*4]
mov dword [eax + edx*4 + 4], ecx
jmp 0x405060
mov edx, dword [ebp + 0x14]
add edx, 1
mov dword [ebp + 0x14], edx
jmp 0x4050e6
mov dword [ebp - 0x418], 1
jmp 0x4050be
mov eax, dword [ebp - 0x418]
add eax, 1
mov dword [ebp - 0x418], eax
mov ecx, dword [ebp - 0x418]
cmp ecx, dword [ebp + 0x14]
jae 0x4050e6
mov edx, dword [ebp - 0x418]
mov eax, dword [ebp - 0x41c]
mov ecx, dword [ebp - 0x418]
mov esi, dword [ebp + 0x18]
mov ecx, dword [esi + ecx*4]
mov dword [eax + edx*4], ecx
jmp 0x4050af
push 0x404820
push 2
call fcn.00413ac4
add esp, 8
push 0x404820
push 0xf
call fcn.00413ac4
add esp, 8
push 0x404820
push 0x16
call fcn.00413ac4
add esp, 8
push 0x104
lea edx, [ebp - 0x20c]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x108]
push eax
push 0x42c180
lea ecx, [ebp - 0x310]
push ecx
call fcn.004058a0
add esp, 0xc
lea edx, [ebp - 0x310]
mov dword [ebp - 0x444], edx
cmp dword [ebp + 0xc], 0
je 0x4051da
cmp dword [ebp + 0x10], 0
je 0x4051da
lea eax, [ebp - 0x310]
push eax
push 0x42c188
call fcn.00402030
add esp, 8
push 1
push 0
mov ecx, dword [ebp - 0x444]
push ecx
call sub.MPR.dll_WNetCancelConnection2A
push 0
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 0x10]
push eax
lea ecx, [ebp - 0x458]
push ecx
call sub.MPR.dll_WNetAddConnection2A
mov dword [ebp - 0x42c], eax
cmp dword [ebp - 0x42c], 0
je 0x4051c4
mov edx, dword [ebp - 0x42c]
push edx
lea eax, [ebp - 0x310]
push eax
push 0x42c1bc
call fcn.00402030
add esp, 0xc
jmp 0x4051d8
lea ecx, [ebp - 0x310]
push ecx
push 0x42c1e0
call fcn.00402030
add esp, 8
jmp 0x4051e7
push 0x42c1fc
call fcn.00402030
add esp, 4
lea edx, [ebp - 0x424]
push edx
push 0x104
lea eax, [ebp - 0x420]
push eax
push 0x104
lea ecx, [ebp - 0x108]
push ecx
call fcn.00404010
add esp, 0x14
test eax, eax
jne 0x40522b
lea edx, [ebp - 0x108]
push edx
push 0x42c224
call fcn.00402030
add esp, 8
jmp 0x405866
mov eax, dword [ebp - 0x424]
push eax
call fcn.0040a520
add esp, 4
test eax, eax
jbe 0x405251
mov ecx, dword [ebp - 0x420]
push ecx
call fcn.0040a520
add esp, 4
test eax, eax
ja 0x40526a
lea edx, [ebp - 0x108]
push edx
push 0x42c250
call fcn.00402030
add esp, 8
jmp 0x405866
push 0x42c27c
mov eax, dword [ebp - 0x420]
push eax
push 0x42c294
push 0x104
lea ecx, [ebp - 0x414]
push ecx
call fcn.00402750
add esp, 0x14
cmp eax, 0xffffffff
jne 0x4052c6
mov edx, 1
imul eax, edx, 0x103
mov dword [ebp - 0x430], eax
cmp dword [ebp - 0x430], 0x104
jae 0x4052b3
jmp 0x4052b8
call fcn.0040722d
mov ecx, dword [ebp - 0x430]
mov byte [ebp + ecx - 0x414], 0
lea edx, [ebp - 0x108]
push edx
push str.___Copying_service_to__s_n
call fcn.00402030
add esp, 8
push 0x5c
lea eax, [ebp - 0x20c]
push eax
call fcn.00408520
add esp, 8
add eax, 1
lea ecx, [ebp - 0x20c]
sub eax, ecx
mov edx, 0x103
sub edx, eax
push edx
push 0x42c2b8
push 0x5c
lea eax, [ebp - 0x20c]
push eax
call fcn.00408520
add esp, 8
add eax, 1
push eax
call fcn.0040a5b0
add esp, 0xc
mov ecx, 1
imul edx, ecx, 0x103
mov dword [ebp - 0x434], edx
cmp dword [ebp - 0x434], 0x104
jae 0x40533f
jmp 0x405344
call fcn.0040722d
mov eax, dword [ebp - 0x434]
mov byte [ebp + eax - 0x20c], 0
push 0x103
mov ecx, dword [ebp - 0x424]
push ecx
mov edx, dword [0x42fbbc]
mov eax, dword fs:[0x2c]
mov ecx, dword [eax + edx*4]
add ecx, 0xc0
push ecx
call fcn.0040a5b0
add esp, 0xc
mov edx, 1
imul eax, edx, 0x103
mov dword [ebp - 0x438], eax
cmp dword [ebp - 0x438], 0x104
jae 0x40539b
jmp 0x4053a0
call fcn.0040722d
mov ecx, dword [0x42fbbc]
mov edx, dword fs:[0x2c]
mov eax, dword [edx + ecx*4]
mov ecx, dword [ebp - 0x438]
mov byte [eax + ecx + 0xc0], 0
mov edx, dword [0x42fbbc]
mov eax, dword fs:[0x2c]
mov ecx, dword [eax + edx*4]
add ecx, 0xc0
push ecx
call fcn.0040a520
add esp, 4
mov edx, 0x104
sub edx, eax
push edx
push 0x42c2d0
mov eax, dword [0x42fbbc]
mov ecx, dword fs:[0x2c]
mov edx, dword [ecx + eax*4]
add edx, 0xc0
push edx
call fcn.00413090
add esp, 0xc
push 0
mov eax, dword [0x42fbbc]
mov ecx, dword fs:[0x2c]
mov edx, dword [ecx + eax*4]
add edx, 0xc0
push edx
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x405482
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x50
jne 0x40544a
push str.____File_already_exists
call fcn.00402030
add esp, 4
jmp 0x405480
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov ecx, dword [0x42fbbc]
mov edx, dword fs:[0x2c]
mov eax, dword [edx + ecx*4]
add eax, 0xc0
push eax
lea ecx, [ebp - 0x20c]
push ecx
push str.____Couldnt_copy__s_to_destination__s:__d_n
call fcn.00402030
add esp, 0x10
jmp 0x405866
jmp 0x40548f
push str.___Copied_service_successfully_n
call fcn.00402030
add esp, 4
push 0x28
push 0
mov edx, dword [0x42fbbc]
mov eax, dword fs:[0x2c]
mov ecx, dword [eax + edx*4]
add ecx, 0x70
push ecx
call fcn.00407d10
add esp, 0xc
push 0x28
push 0
mov edx, dword [0x42fbbc]
mov eax, dword fs:[0x2c]
mov ecx, dword [eax + edx*4]
add ecx, 0x44
push ecx
call fcn.00407d10
add esp, 0xc
mov edx, dword [0x42fbbc]
mov eax, dword fs:[0x2c]
mov ecx, dword [eax + edx*4]
add ecx, 0x18
push ecx
call dword [sym.imp.ole32.dll_CoCreateGuid]
push 0x27
mov edx, dword [0x42fbbc]
mov eax, dword fs:[0x2c]
mov ecx, dword [eax + edx*4]
add ecx, 0x70
push ecx
mov edx, dword [0x42fbbc]
mov eax, dword fs:[0x2c]
mov ecx, dword [eax + edx*4]
add ecx, 0x18
push ecx
call dword [sym.imp.ole32.dll_StringFromGUID2]
push 0x28
mov edx, dword [0x42fbbc]
mov eax, dword fs:[0x2c]
mov ecx, dword [eax + edx*4]
add ecx, 0x70
push ecx
mov edx, dword [0x42fbbc]
mov eax, dword fs:[0x2c]
mov ecx, dword [eax + edx*4]
add ecx, 0x44
push ecx
call fcn.0041366a
add esp, 0xc
push 2
push 0
lea edx, [ebp - 0x108]
push edx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ecx, dword [0x42fbbc]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
mov dword [ecx + 0xc], eax
mov edx, dword [0x42fbbc]
mov eax, dword fs:[0x2c]
mov ecx, dword [eax + edx*4]
cmp dword [ecx + 0xc], 0
jne 0x4055aa
push 0x42c350
call fcn.00402030
add esp, 4
jmp 0x405866
push str.___Creating_incognita_service_on_remote_host_n
call fcn.00402030
add esp, 4
push 0
push 0
push 0
push 0
push 0
lea edx, [ebp - 0x414]
push edx
push 0
push 3
push 0x10
push 0xf01ff
push str.incognita_Service
push 0x42c3c0
mov eax, dword [0x42fbbc]
mov ecx, dword fs:[0x2c]
mov edx, dword [ecx + eax*4]
mov eax, dword [edx + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov ecx, dword [0x42fbbc]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
mov dword [ecx + 8], eax
mov edx, dword [0x42fbbc]
mov eax, dword fs:[0x2c]
mov ecx, dword [eax + edx*4]
cmp dword [ecx + 8], 0
jne 0x4056bd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.____Failed_to_create_service._Attempting_to_open_pre_existing_service:__d_n
call fcn.00402030
add esp, 8
push 0xf01ff
push 0x42c424
mov edx, dword [0x42fbbc]
mov eax, dword fs:[0x2c]
mov ecx, dword [eax + edx*4]
mov edx, dword [ecx + 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov ecx, dword [0x42fbbc]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
mov dword [ecx + 8], eax
mov edx, dword [0x42fbbc]
mov eax, dword fs:[0x2c]
mov ecx, dword [eax + edx*4]
cmp dword [ecx + 8], 0
jne 0x4056ae
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x42c438
call fcn.00402030
add esp, 8
jmp 0x405866
push str.___Existing_service_found_and_opened_successfully_n
call fcn.00402030
add esp, 4
jmp 0x4056ca
push str.___Created_service_successfully_n
call fcn.00402030
add esp, 4
mov edx, dword [0x42fbbc]
mov eax, dword fs:[0x2c]
mov ecx, dword [eax + edx*4]
add ecx, 0x44
mov edx, 4
imul eax, edx, 0
mov edx, dword [ebp - 0x41c]
mov dword [edx + eax], ecx
push str.___Starting_service_n
call fcn.00402030
add esp, 4
mov eax, dword [ebp - 0x41c]
push eax
mov ecx, dword [ebp + 0x14]
push ecx
mov edx, dword [0x42fbbc]
mov eax, dword fs:[0x2c]
mov ecx, dword [eax + edx*4]
mov edx, dword [ecx + 8]
push edx
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x405743
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.____Service_start_failed:__d_n
call fcn.00402030
add esp, 8
jmp 0x405866
push str.___Service_started_n
call fcn.00402030
add esp, 4
lea eax, [ebp - 0x108]
push eax
call fcn.00404380
add esp, 4
mov ecx, 1
test ecx, ecx
je 0x4057cc
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [0x42fbbc]
mov eax, dword fs:[0x2c]
mov ecx, dword [eax + edx*4]
mov edx, 1
imul eax, edx, 0
movsx ecx, byte [ecx + eax + 0xc0]
test ecx, ecx
je 0x4057ca
mov edx, dword [0x42fbbc]
mov eax, dword fs:[0x2c]
mov ecx, dword [eax + edx*4]
add ecx, 0xc0
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x4057ca
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push str.___Service_shutdown_detected._Service_executable_file_deleted_n
call fcn.00402030
add esp, 4
jmp 0x4057cc
jmp 0x40575f
mov edx, dword [0x42fbbc]
mov eax, dword fs:[0x2c]
mov ecx, dword [eax + edx*4]
mov edx, dword [ecx + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x42fbbc]
mov ecx, dword fs:[0x2c]
mov edx, dword [ecx + eax*4]
mov eax, dword [edx + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.___Deleting_service_n
call fcn.00402030
add esp, 4
mov ecx, dword [0x42fbbc]
mov edx, dword fs:[0x2c]
mov eax, dword [edx + ecx*4]
mov ecx, dword [eax + 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_DeleteService]
mov edx, dword [0x42fbbc]
mov eax, dword fs:[0x2c]
mov ecx, dword [eax + edx*4]
mov edx, dword [ecx + 8]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [0x42fbbc]
mov ecx, dword fs:[0x2c]
mov edx, dword [ecx + eax*4]
mov eax, dword [edx + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004070d2
mov esp, ebp
pop ebp
ret