Function at 0x40d5b0
Capabilities:
Create process on windows
Create process suspended
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x421db0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x278
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x14], 0
push 0x8001
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
mov dword [ebp - 0x18], eax
push 1
push 0x208
call fcn.0041a522
add esp, 8
mov ebx, eax
test ebx, ebx
je 0x40d79a
mov eax, dword [0x42adb4]
test eax, eax
jne 0x40d659
push 0x104
push ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push ebx
call fcn.00402110
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
dec edi
mov eax, dword [str.regsvr32.exe]
mov dword [edi], eax
mov ecx, dword [0x425d40]
mov dword [edi + 4], ecx
mov edx, dword [0x425d44]
mov dword [edi + 8], edx
mov al, byte [0x425d48]
mov byte [edi + 0xc], al
push ebx
call fcn.00401100
add esp, 8
test eax, eax
je 0x40d786
mov byte [ebx], 0x22
push 0x104
lea ecx, [ebx + 1]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push ebx
call fcn.00402110
add esp, 4
mov eax, dword [ebp + 8]
test eax, eax
je 0x40d6b3
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
dec edi
mov edx, dword [str.regsvr32___s__]
mov dword [edi], edx
mov eax, dword [0x425d30]
mov dword [edi + 4], eax
mov ecx, dword [0x425d34]
mov dword [edi + 8], ecx
mov dx, word [0x425d38]
mov word [edi + 0xc], dx
mov al, byte [0x425d3a]
mov byte [edi + 0xe], al
jmp 0x40d6c6
mov eax, str.regsvr32___u__s__
mov edx, ebx
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x40d6bc
mov edi, dword [0x42a9b4]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ax, word [0x425898]
mov word [edi - 1], ax
xor ecx, ecx
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x1c], ecx
mov ecx, 0x11
xor eax, eax
lea edi, [ebp - 0x6c]
rep stosd dword es:[edi], eax
mov dword [ebp - 0x6c], 0x44
lea edx, [ebp - 0x28]
push edx
lea eax, [ebp - 0x6c]
push eax
push 0
push 0
push 0x20
push 1
push 0
push 0
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x40d786
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x40d77f
mov edi, dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [ebp - 0x70]
push ecx
mov edx, dword [ebp - 0x28]
push edx
call edi
test eax, eax
je 0x40d775
push 0xfa
call esi
cmp dword [ebp - 0x70], 0x103
je 0x40d757
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x14], 1
push ebx
call fcn.0041a5d3
add esp, 4
mov eax, dword [ebp - 0x14]
test eax, eax
jne 0x40d871
mov byte [ebp - 0x178], 0
lea ecx, [ebp - 0x178]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea edx, [ebp - 0x178]
push edx
call fcn.00402150
add esp, 4
mov eax, dword [0x42a9b4]
lea edx, [ebp - 0x280]
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x40d7cf
push 0x5c
lea eax, [ebp - 0x280]
push eax
call fcn.0041a320
add esp, 8
test eax, eax
je 0x40d7fe
mov byte [eax], 0
lea ecx, [ebp - 0x280]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov edx, dword [0x42a9b4]
push edx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
mov dword [ebp - 0x284], esi
cmp esi, 0x20
jb 0x40d85a
mov eax, dword [ebp + 8]
test eax, eax
mov eax, str.DllRegisterServer
jne 0x40d829
mov eax, str.DllUnregisterServer
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40d84c
mov dword [ebp - 4], 0
call eax
jmp 0x40d84c
mov dword [ebp - 4], 0xffffffff
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov al, byte [ebp - 0x178]
test al, al
je 0x40d871
lea eax, [ebp - 0x178]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret