Function at 0x40dc10
Capabilities:
Get common file path

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44c6ac
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x240
mov eax, dword [0x46706c]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor eax, eax
mov dword [ebp - 0x250], 0
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x21c], 7
mov word [ebp - 0x230], ax
push 0x100
push eax
mov dword [ebp - 4], eax
lea eax, [ebp - 0x218]
push eax
call fcn.0042d440
add esp, 0xc
push str._INF___ServiceMain___Start
push 0
call fcn.004024e0
push 0x80
lea eax, [ebp - 0x98]
push 0
push eax
call fcn.0042d440
mov edi, dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea eax, [ebp - 0x98]
add esp, 0x14
push 0x40
push eax
call edi
push 0x104
lea eax, [ebp - 0x218]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
sub esp, 0x18
lea ecx, [ebp - 0x218]
mov edx, esp
lea esi, [ecx + 2]
xor eax, eax
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 7
mov word [edx], ax
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40dd00
sub ecx, esi
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
mov ecx, edx
call fcn.00403ae0
lea ecx, [ebp - 0x248]
call fcn.00403100
mov esi, eax
add esp, 0x18
cmp esi, 0x467abc
je 0x40dd6a
mov ecx, 0x467abc
call fcn.00403740
movups xmm0, xmmword [esi]
xor eax, eax
movups xmmword [0x467abc], xmm0
movq xmm0, qword [esi + 0x10]
movq qword [0x467acc], xmm0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 7
mov word [esi], ax
mov edx, dword [ebp - 0x234]
cmp edx, 8
jb 0x40ddaa
mov ecx, dword [ebp - 0x248]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40dda0
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40e1a1
push edx
push ecx
call fcn.004153c5
add esp, 8
push 0x100
lea eax, [ebp - 0x118]
push 0
push eax
call fcn.0042d440
add esp, 0xc
lea eax, [ebp - 0x118]
push 0x80
push eax
call edi
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x40de03
mov ecx, dword [ebp - 0x118]
cmp cx, 0x78
je 0x40de24
cmp cx, 0x58
je 0x40de24
lea eax, [ebp - 0x24c]
push eax
lea edx, [ebp - 0x250]
call fcn.00403560
add esp, 4
test al, al
jne 0x40de24
call esi
push eax
push str._ERR___FindWindowsDrive___GetWindowsDirectory_Error__GetLastError__d
push 0
call fcn.004024e0
add esp, 0xc
push str._ERR___ServiceMain___FindWindowsDrive_Error.
push 0
call fcn.004024e0
add esp, 8
cmp byte [0x46d6d0], 0
mov edi, dword [sym.imp.ADVAPI32.dll_SetServiceStatus]
jne 0x40df79
push 0x40e1b0
push str.CMigrationService
call dword [sym.imp.ADVAPI32.dll_RegisterServiceCtrlHandlerW]
mov dword [0x46d6ac], eax
test eax, eax
jne 0x40de5a
push str._ERR___ServiceMain___g_StatusHandle__NULL
jmp 0x40e168
push 0x46d6b4
push eax
mov dword [0x46d6cc], 0
mov dword [0x46d6b4], 0x10
mov dword [0x46d6bc], 0
mov dword [0x46d6b8], 2
mov dword [0x46d6c0], 0
mov dword [0x46d6c4], 0
mov dword [0x46d6c8], 0
call edi
test eax, eax
jne 0x40deba
push str._ERR___ServiceMain__SetServiceStatus__FALSE
push eax
call fcn.004024e0
add esp, 8
push str._INF___ServiceMain___ServiceMain:_Performing_Service_Start_Operations
push 0
call fcn.004024e0
add esp, 8
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [0x467aa0], eax
test eax, eax
jne 0x40df32
push str._ERR___ServiceMain___g_ServiceStopEvent__NULL
push eax
call fcn.004024e0
add esp, 8
mov dword [0x46d6bc], 0
mov dword [0x46d6b8], 1
call esi
push 0x46d6b4
push dword [0x46d6ac]
mov dword [0x46d6c0], eax
mov dword [0x46d6c8], 1
call edi
test eax, eax
jne 0x40e172
push str._ERR___ServiceMain___SetServiceStatus__FALSE
jmp 0x40e168
push 0x46d6b4
push dword [0x46d6ac]
mov dword [0x46d6bc], 0
mov dword [0x46d6b8], 4
mov dword [0x46d6c0], 0
mov dword [0x46d6c8], 0
call edi
test eax, eax
jne 0x40df79
push str._ERR___ServiceMain___SetServiceStatus__FALSE
push eax
call fcn.004024e0
add esp, 8
cmp dword [0x46d6a8], 0
jne 0x40e08f
push 0x189e1
call fcn.00414ffd
mov edi, eax
add esp, 4
mov dword [ebp - 0x24c], edi
mov ecx, edi
mov byte [ebp - 4], 1
call fcn.00404ac0
xor eax, eax
lea esi, [edi + 0x1790e]
push 0x7fe
push eax
mov word [esi], ax
lea eax, [esi + 2]
push eax
call fcn.0042d440
add esp, 0xc
xor eax, eax
mov word [esi + 0x800], ax
push 0x7fe
push eax
lea eax, [esi + 0x802]
push eax
call fcn.0042d440
mov dword [esi + 0x1010], 0
xor eax, eax
mov dword [esi + 0x1014], 0xf
add esp, 0xc
mov byte [esi + 0x1000], 0
mov dword [esi + 0x1028], 0
mov dword [esi + 0x102c], 0xf
mov byte [esi + 0x1018], 0
mov dword [esi + 0x1040], 0
mov dword [esi + 0x1044], 0xf
mov byte [esi + 0x1030], 0
mov dword [esi + 0x1080], 0
mov dword [esi + 0x1084], 7
mov word [esi + 0x1070], ax
mov dword [esi + 0x1098], eax
mov dword [esi + 0x109c], 7
mov word [esi + 0x1088], ax
mov word [esi + 0x1048], ax
mov ecx, edi
mov byte [ebp - 4], 3
call fcn.00405220
mov ecx, esi
call fcn.0040e710
mov byte [ebp - 4], 0
mov dword [0x46d6a8], edi
mov edi, dword [sym.imp.ADVAPI32.dll_SetServiceStatus]
push ecx
call fcn.0040b450
push ecx
call fcn.0040b9b0
push str._INF___ServiceMain___ServiceMain:_Waiting_for_Worker_Thread_to_complete
push 0
call fcn.004024e0
add esp, 8
cmp byte [0x468bb4], 0
je 0x40e0d0
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
nop dword [eax]
push 0x3e8
call esi
cmp byte [0x468bb4], 0
jne 0x40e0c0
push str._INF___ServiceMain___ServiceMain:_Worker_Thread_Stop_Event_signaled
push 0
call fcn.004024e0
push str._INF___ServiceMain___ServiceMain:_Performing_Cleanup_Operations
push 0
call fcn.004024e0
add esp, 0x10
push dword [0x467aa0]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [0x46d6a8]
test esi, esi
je 0x40e121
lea ecx, [esi + 0x1790e]
call fcn.0040e600
mov ecx, esi
call fcn.00405040
push 0x189e1
push esi
call fcn.004153c5
add esp, 8
cmp byte [0x46d6d0], 0
jne 0x40e172
push 0x46d6b4
push dword [0x46d6ac]
mov dword [0x46d6bc], 0
mov dword [0x46d6b8], 1
mov dword [0x46d6c0], 0
mov dword [0x46d6c8], 3
call edi
test eax, eax
jne 0x40e172
push str._INF___ServiceMain___ServiceMain:_SetServiceStatus_returned_error
push 0
call fcn.004024e0
add esp, 8
push str._INF___ServiceMain____ServiceMain:_Exit
push 0
call fcn.004024e0
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00414dec
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 8
call fcn.004375f1
int3