Function at 0x4ba7b0
Capabilities:
Copy file
Create process on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x596cab
mov eax, dword fs:[0]
push eax
sub esp, 0x3b0
mov eax, dword [0x5fae30]
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
push 0x3c
mov edi, ecx
xor ebx, ebx
push str.CServiceModule::Replace___Trying_to_replace_running_process_n
lea ecx, [ebp - 0x234]
mov dword [ebp - 0x220], 0xf
mov dword [ebp - 0x224], ebx
mov byte [ebp - 0x234], bl
call fcn.00402a36
push ebx
lea eax, [ebp - 0x234]
push eax
mov ecx, 0x5fda4c
mov dword [ebp - 4], ebx
call fcn.005383c0
cmp dword [ebp - 0x220], 0x10
mov dword [ebp - 4], 0xffffffff
jb 0x4ba83e
mov ecx, dword [ebp - 0x234]
push ecx
call fcn.0053ed60
add esp, 4
push 0xf003f
push ebx
push ebx
mov dword [ebp - 0x370], ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
cmp esi, ebx
je 0x4ba887
push 1
add edi, 0x30
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
cmp eax, ebx
je 0x4ba876
push eax
mov edi, 1
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x4ba87c
mov edi, dword [ebp - 0x370]
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp edi, ebx
jne 0x4ba8ea
push 0x42
push str.CServiceModule::Replace___Not_installed_as_service__cant_replace_
lea ecx, [ebp - 0x234]
mov dword [ebp - 0x220], 0xf
mov dword [ebp - 0x224], ebx
mov byte [ebp - 0x234], bl
call fcn.00402a36
push 1
lea edx, [ebp - 0x234]
push edx
mov ecx, 0x5fda4c
mov dword [ebp - 4], 1
call fcn.005383c0
cmp dword [ebp - 0x220], 0x10
jb 0x4bb1c9
mov eax, dword [ebp - 0x234]
push eax
call fcn.0053ed60
add esp, 4
jmp 0x4bb1c9
push 0x2e
mov edi, 0xf
push str.CServiceModule::Replace___Service_is_installed
lea ecx, [ebp - 0x234]
mov dword [ebp - 0x220], edi
mov dword [ebp - 0x224], ebx
mov byte [ebp - 0x234], bl
call fcn.00402a36
push ebx
lea ecx, [ebp - 0x234]
push ecx
mov ecx, 0x5fda4c
mov dword [ebp - 4], 2
call fcn.005383c0
mov esi, 0x10
cmp dword [ebp - 0x220], esi
jb 0x4ba948
mov edx, dword [ebp - 0x234]
push edx
call fcn.0053ed60
add esp, 4
xor eax, eax
mov dword [ebp - 0x370], ebx
mov dword [ebp - 0x274], 7
mov dword [ebp - 0x278], ebx
mov word [ebp - 0x288], ax
lea ecx, [ebp - 0x288]
push ecx
lea edx, [ebp - 0x370]
push edx
push 0x5b905c
mov dword [ebp - 4], 3
call fcn.0040215d
add esp, 0xc
test al, al
jne 0x4baa00
push 0x38
push str.CServiceModule::Replace___Failed_getting_service_status_
lea ecx, [ebp - 0x234]
mov dword [ebp - 0x220], edi
mov dword [ebp - 0x224], ebx
mov byte [ebp - 0x234], bl
call fcn.00402a36
push 1
lea eax, [ebp - 0x234]
push eax
mov ecx, 0x5fda4c
mov byte [ebp - 4], 4
call fcn.005383c0
cmp dword [ebp - 0x220], esi
jb 0x4ba9df
mov ecx, dword [ebp - 0x234]
push ecx
call fcn.0053ed60
add esp, 4
cmp dword [ebp - 0x274], 8
jb 0x4bb1c9
mov edx, dword [ebp - 0x288]
push edx
call fcn.0053ed60
add esp, 4
jmp 0x4bb1c9
cmp dword [ebp - 0x370], 4
je 0x4baa3e
push 4
push 0x5b90e4
call fcn.00405a60
add esp, 8
test al, al
jne 0x4baa3e
push str.CServiceModule::Replace___Failed_setting_service_status_
lea ecx, [ebp - 0x250]
call fcn.00403dfa
push 1
lea eax, [ebp - 0x250]
mov byte [ebp - 4], 5
push eax
jmp 0x4bb1a9
push 0x5b9128
call fcn.00403ea9
add esp, 4
test al, al
je 0x4babb8
push 0x5b9134
call fcn.004076d5
add esp, 4
test al, al
jne 0x4bab01
push str.CServiceModule::Replace___Failed_to_shutdown_service_
lea ecx, [ebp - 0x250]
call fcn.00403dfa
push 1
lea ecx, [ebp - 0x250]
push ecx
mov ecx, 0x5fda4c
mov byte [ebp - 4], 6
call fcn.005383c0
lea ecx, [ebp - 0x250]
call fcn.0040583f
mov dword [ebp - 0x258], edi
mov dword [ebp - 0x25c], ebx
mov byte [ebp - 0x26c], bl
lea edx, [ebp - 0x26c]
push edx
lea eax, [ebp - 0x369]
push eax
push 0x5b9174
mov byte [ebp - 4], 7
mov byte [ebp - 0x369], bl
call fcn.00406f78
add esp, 0xc
cmp byte [ebp - 0x369], bl
je 0x4baba2
lea ecx, [ebp - 0x26c]
push ecx
lea edx, [ebp - 0x250]
push 0x5b9180
push edx
call fcn.00408a0d
add esp, 0xc
mov byte [ebp - 4], 8
jmp 0x4bab8a
mov esi, 0x12c
push 0x5b91bc
call fcn.00403ea9
add esp, 4
test al, al
je 0x4bab24
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
dec esi
jne 0x4bab06
jmp 0x4bab2c
cmp esi, ebx
jne 0x4babb8
mov dword [ebp - 0x258], edi
mov dword [ebp - 0x25c], ebx
mov byte [ebp - 0x26c], bl
lea eax, [ebp - 0x26c]
push eax
lea ecx, [ebp - 0x369]
push ecx
push 0x5b91c8
mov byte [ebp - 4], 9
mov byte [ebp - 0x369], bl
call fcn.00406f78
add esp, 0xc
cmp byte [ebp - 0x369], bl
je 0x4baba2
lea edx, [ebp - 0x26c]
push edx
lea eax, [ebp - 0x250]
push 0x5b91d4
push eax
call fcn.00408a0d
add esp, 0xc
mov byte [ebp - 4], 0xa
push 1
push eax
mov ecx, 0x5fda4c
call fcn.005383c0
lea ecx, [ebp - 0x250]
call fcn.0040583f
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [ebp - 0x26c]
call fcn.0040583f
push 0x208
lea ecx, [ebp - 0x218]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov eax, 0x32
lea esi, [eax - 0x22]
dec eax
mov dword [ebp - 0x378], eax
mov dword [ebp - 0x258], edi
mov dword [ebp - 0x25c], ebx
mov byte [ebp - 0x26c], bl
lea edx, [ebp - 0x26c]
push edx
lea eax, [ebp - 0x369]
push eax
push 0x5b9210
mov byte [ebp - 4], 0xb
mov byte [ebp - 0x369], bl
call fcn.00406f78
add esp, 0xc
cmp byte [ebp - 0x369], bl
je 0x4bac60
lea ecx, [ebp - 0x26c]
push ecx
lea edx, [ebp - 0x250]
push str.CServiceModule::Replace___Terminate_service_with_error:
push edx
call fcn.00408a0d
add esp, 0xc
push 1
push eax
mov ecx, 0x5fda4c
mov byte [ebp - 4], 0xc
call fcn.005383c0
mov byte [ebp - 4], 0xb
cmp dword [ebp - 0x23c], esi
jb 0x4bac60
mov eax, dword [ebp - 0x250]
push eax
call fcn.0053ed60
add esp, 4
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [ebp - 0x274], 8
mov eax, dword [ebp - 0x288]
jae 0x4bac7d
lea eax, [ebp - 0x288]
push ebx
push eax
lea ecx, [ebp - 0x218]
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
setne al
mov byte [ebp - 0x369], al
cmp al, bl
jne 0x4baf76
xor edx, edx
lea eax, [ebp - 0x218]
mov dword [ebp - 0x31c], 7
mov dword [ebp - 0x320], ebx
mov word [ebp - 0x330], dx
lea ecx, [eax + 2]
mov dx, word [eax]
add eax, 2
cmp dx, bx
jne 0x4bacc1
sub eax, ecx
sar eax, 1
push eax
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x330]
call fcn.00403594
mov byte [ebp - 4], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x250]
push ecx
call fcn.004080a8
mov esi, eax
lea edx, [ebp - 0x288]
push edx
lea eax, [ebp - 0x2f8]
push eax
mov byte [ebp - 4], 0xe
call fcn.00406569
mov edi, eax
lea ecx, [ebp - 0x330]
push ecx
lea edx, [ebp - 0x2c0]
push edx
mov byte [ebp - 4], 0xf
call fcn.00406569
add esp, 0x18
mov dword [ebp - 0x374], eax
push 0x34
push str.CServiceModule::Replace___Failed_copying_file_from:
lea ecx, [ebp - 0x234]
mov byte [ebp - 4], 0x10
mov dword [ebp - 0x220], 0xf
mov dword [ebp - 0x224], ebx
mov byte [ebp - 0x234], bl
call fcn.00402a36
mov eax, dword [ebp - 0x374]
push eax
lea ecx, [ebp - 0x234]
push ecx
lea edx, [ebp - 0x314]
push edx
mov byte [ebp - 4], 0x11
call fcn.00407cd9
push 0x5b9268
push eax
lea eax, [ebp - 0x2dc]
push eax
mov byte [ebp - 4], 0x12
call fcn.00407c9d
push edi
push eax
lea ecx, [ebp - 0x2a4]
push ecx
mov byte [ebp - 4], 0x13
call fcn.00407cd9
push 0x5b9258
push eax
lea edx, [ebp - 0x368]
push edx
mov byte [ebp - 4], 0x14
call fcn.00407c9d
push esi
push eax
lea eax, [ebp - 0x34c]
push eax
mov byte [ebp - 4], 0x15
call fcn.00407cd9
add esp, 0x3c
mov byte [ebp - 4], 0x16
push 1
push eax
mov ecx, 0x5fda4c
call fcn.005383c0
mov esi, 0x10
cmp dword [ebp - 0x338], esi
jb 0x4badff
mov ecx, dword [ebp - 0x34c]
push ecx
call fcn.0053ed60
add esp, 4
mov edi, 0xf
mov dword [ebp - 0x338], edi
mov dword [ebp - 0x33c], ebx
mov byte [ebp - 0x34c], bl
cmp dword [ebp - 0x354], esi
jb 0x4bae2d
mov edx, dword [ebp - 0x368]
push edx
call fcn.0053ed60
add esp, 4
mov dword [ebp - 0x354], edi
mov dword [ebp - 0x358], ebx
mov byte [ebp - 0x368], bl
cmp dword [ebp - 0x290], esi
jb 0x4bae56
mov eax, dword [ebp - 0x2a4]
push eax
call fcn.0053ed60
add esp, 4
mov dword [ebp - 0x290], edi
mov dword [ebp - 0x294], ebx
mov byte [ebp - 0x2a4], bl
cmp dword [ebp - 0x2c8], esi
jb 0x4bae7f
mov ecx, dword [ebp - 0x2dc]
push ecx
call fcn.0053ed60
add esp, 4
mov dword [ebp - 0x2c8], edi
mov dword [ebp - 0x2cc], ebx
mov byte [ebp - 0x2dc], bl
cmp dword [ebp - 0x300], esi
jb 0x4baea8
mov edx, dword [ebp - 0x314]
push edx
call fcn.0053ed60
add esp, 4
mov dword [ebp - 0x300], edi
mov dword [ebp - 0x304], ebx
mov byte [ebp - 0x314], bl
cmp dword [ebp - 0x220], esi
jb 0x4baed1
mov eax, dword [ebp - 0x234]
push eax
call fcn.0053ed60
add esp, 4
mov dword [ebp - 0x220], edi
mov dword [ebp - 0x224], ebx
mov byte [ebp - 0x234], bl
cmp dword [ebp - 0x2ac], esi
jb 0x4baefa
mov ecx, dword [ebp - 0x2c0]
push ecx
call fcn.0053ed60
add esp, 4
mov dword [ebp - 0x2ac], edi
mov dword [ebp - 0x2b0], ebx
mov byte [ebp - 0x2c0], bl
cmp dword [ebp - 0x2e4], esi
jb 0x4baf23
mov edx, dword [ebp - 0x2f8]
push edx
call fcn.0053ed60
add esp, 4
mov dword [ebp - 0x2e4], edi
mov dword [ebp - 0x2e8], ebx
mov byte [ebp - 0x2f8], bl
cmp dword [ebp - 0x23c], esi
jb 0x4baf4c
mov eax, dword [ebp - 0x250]
push eax
call fcn.0053ed60
add esp, 4
cmp dword [ebp - 0x31c], 8
mov dword [ebp - 0x23c], edi
mov dword [ebp - 0x240], ebx
mov byte [ebp - 0x250], bl
jb 0x4baf76
mov ecx, dword [ebp - 0x330]
push ecx
call fcn.0053ed60
add esp, 4
mov esi, 0x10
mov byte [ebp - 4], 3
cmp dword [ebp - 0x258], esi
jb 0x4baf96
mov edx, dword [ebp - 0x26c]
push edx
call fcn.0053ed60
add esp, 4
mov eax, dword [ebp - 0x378]
cmp eax, ebx
je 0x4bafae
cmp byte [ebp - 0x369], bl
je 0x4babd3
jmp 0x4bafba
cmp byte [ebp - 0x369], bl
je 0x4bb10e
push 0x44
lea eax, [ebp - 0x3bc]
push ebx
push eax
call fcn.005409b0
mov eax, dword [ebp - 0x288]
add esp, 0xc
cmp dword [ebp - 0x274], 8
mov dword [ebp - 0x3bc], 0x44
jae 0x4bafeb
lea eax, [ebp - 0x288]
lea ecx, [ebp - 0x228]
push ecx
lea edx, [ebp - 0x3bc]
push edx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push str._Update__Service
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
setne al
cmp al, bl
jne 0x4bb0f6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x2a4]
push eax
call fcn.004080a8
mov esi, eax
lea ecx, [ebp - 0x288]
push ecx
lea edx, [ebp - 0x2dc]
push edx
mov byte [ebp - 4], 0x17
call fcn.00406569
add esp, 0x10
mov edi, eax
push str.CServiceModule::Replace___Failed_to_run:
lea ecx, [ebp - 0x314]
mov byte [ebp - 4], 0x18
call fcn.00403dfa
push edi
push eax
lea eax, [ebp - 0x2c0]
push eax
mov byte [ebp - 4], 0x19
call fcn.00407cd9
push 0x5b92cc
push eax
lea ecx, [ebp - 0x2f8]
push ecx
mov byte [ebp - 4], 0x1a
call fcn.00407c9d
push esi
push eax
lea edx, [ebp - 0x250]
push edx
mov byte [ebp - 4], 0x1b
call fcn.00407cd9
add esp, 0x24
push ebx
push eax
mov ecx, 0x5fda4c
mov byte [ebp - 4], 0x1c
call fcn.005383c0
lea ecx, [ebp - 0x250]
call fcn.0040583f
lea ecx, [ebp - 0x2f8]
call fcn.0040583f
lea ecx, [ebp - 0x2c0]
call fcn.0040583f
lea ecx, [ebp - 0x314]
call fcn.0040583f
lea ecx, [ebp - 0x2dc]
call fcn.0040583f
lea ecx, [ebp - 0x2a4]
mov byte [ebp - 4], 3
call fcn.0040583f
mov byte [ebp - 0x369], bl
mov eax, dword [ebp - 0x224]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
mov ecx, dword [ebp - 0x228]
push ecx
call esi
mov eax, dword [ebp - 0x370]
cmp eax, 4
je 0x4bb14a
push eax
push 0x5b9308
call fcn.00405a60
add esp, 8
test al, al
jne 0x4bb14a
push str.CServiceModule::Replace___Failed_setting_service_status__2__
lea ecx, [ebp - 0x250]
call fcn.00403dfa
push 1
lea edx, [ebp - 0x250]
mov byte [ebp - 4], 0x1d
push edx
jmp 0x4bb1a9
lea ecx, [ebp - 0x250]
cmp byte [ebp - 0x369], bl
je 0x4bb192
push str.CServiceModule::Replace___Success
call fcn.00403dfa
push ebx
lea eax, [ebp - 0x250]
push eax
mov ecx, 0x5fda4c
mov byte [ebp - 4], 0x1e
call fcn.005383c0
lea ecx, [ebp - 0x250]
call fcn.0040583f
lea ecx, [ebp - 0x288]
call fcn.00406dfc
xor eax, eax
jmp 0x4bb1ce
push str.CServiceModule::Replace___Failed_
call fcn.00403dfa
push 1
lea ecx, [ebp - 0x250]
mov byte [ebp - 4], 0x1f
push ecx
mov ecx, 0x5fda4c
call fcn.005383c0
lea ecx, [ebp - 0x250]
call fcn.0040583f
lea ecx, [ebp - 0x288]
call fcn.00406dfc
mov eax, 0x80004005
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.0053fd20
mov esp, ebp
pop ebp
ret