Function at 0x40cde0
Capabilities:
Create directory
Get common file path
Get session user name
Query or enumerate registry value
Read .ini file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x42c675
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x1cb0
call fcn.0042aea0
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0xa8], esi
call fcn.0041c530
mov dword [esi + 0xc0a0], 0x433780
lea edi, [esi + 0xc0ac]
xor ebx, ebx
mov ecx, edi
mov dword [esp + 0x1ccc], ebx
mov dword [esi], 0x434b80
mov dword [esi + 0xc0a0], 0x434ad8
call fcn.0040bc70
mov dword [edi + 4], eax
mov dword [edi + 8], ebx
lea edi, [esi + 0xc0b8]
mov ecx, edi
mov byte [esp + 0x1ccc], 1
call fcn.0040bc70
mov dword [edi + 4], eax
mov dword [edi + 8], ebx
lea ecx, [esi + 0xc260]
mov byte [esp + 0x1ccc], 2
mov dword [esi + 0xc1d8], 0x43410c
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
xor eax, eax
mov byte [esp + 0x8b0], bl
mov ecx, 0x200
lea edi, [esp + 0x8b1]
rep stosd dword es:[edi], eax
push 0x800
lea eax, [esp + 0x8b4]
push eax
push ebx
mov byte [esp + 0x1cd8], 3
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 0x8b0]
push ecx
lea ecx, [esp + 0x90]
mov dword [esp + 0x20], eax
mov byte [esp + eax + 0x8b4], bl
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov edx, dword [sym.imp.MSVCP71.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov eax, dword [edx]
push 1
push eax
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x98]
mov byte [esp + 0x1cd8], 4
mov byte [esp + 0x20], 0x5c
call dword [sym.imp.MSVCP71.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::rfind_char_const___unsigned_int__unsigned_int_const]
push eax
push ebx
lea ecx, [esp + 0x34]
push ecx
lea ecx, [esp + 0x98]
call dword [sym.imp.MSVCP71.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::substr_unsigned_int__unsigned_int_]
push eax
lea ecx, [esp + 0x90]
mov byte [esp + 0x1cd0], 5
call dword [sym.imp.MSVCP71.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
lea ecx, [esp + 0x2c]
mov byte [esp + 0x1ccc], 4
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
push 0x434ac8
lea edx, [esp + 0x90]
push edx
lea eax, [esp + 0x34]
push eax
call fcn.00401b00
add esp, 0xc
push eax
mov ecx, 0x443cdc
mov byte [esp + 0x1cd0], 6
call dword [sym.imp.MSVCP71.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
lea ecx, [esp + 0x2c]
mov byte [esp + 0x1ccc], 4
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
push str.CLMSTransMan.ini
lea ecx, [esp + 0x90]
push ecx
lea edx, [esp + 0x34]
push edx
call fcn.00401b00
add esp, 0xc
push eax
mov ecx, 0x443ca4
mov byte [esp + 0x1cd0], 7
call dword [sym.imp.MSVCP71.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
lea ecx, [esp + 0x2c]
mov byte [esp + 0x1ccc], 4
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
xor eax, eax
mov ecx, 0x200
lea edi, [esp + 0x10b9]
mov byte [esp + 0x10b8], bl
rep stosd dword es:[edi], eax
mov eax, dword [0x443cf4]
mov edi, 0x10
cmp eax, edi
mov eax, dword [0x443ce0]
jae 0x40cfef
mov eax, 0x443ce0
push eax
push 0x800
lea eax, [esp + 0x10c0]
push eax
push 0x434a94
push 0x42f7d8
push str.Settings
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push 0x434a70
lea ecx, [esp + 0x74]
mov dword [esp + 0x28], ebx
mov dword [esp + 0x50], ebx
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
push 0x434a6c
lea ecx, [esp + 0x74]
mov byte [esp + 0x1cd0], 8
call dword [sym.imp.MSVCP71.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_char_const__]
lea ecx, [esp + 0x10b8]
push ecx
lea ecx, [esp + 0x74]
call dword [sym.imp.MSVCP71.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_char_const__]
cmp dword [esp + 0x88], edi
mov eax, dword [esp + 0x74]
jae 0x40d063
lea eax, [esp + 0x74]
lea edx, [esp + 0x4c]
push edx
lea ecx, [esp + 0x28]
push ecx
push ebx
push 0xf003f
push ebx
push 0x42e658
push ebx
push eax
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
cmp eax, ebx
jne 0x40d0c4
lea edx, [esp + 0x18]
push edx
mov edx, dword [esp + 0x28]
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x28]
push ecx
push ebx
push str.DumpException
push edx
mov dword [esp + 0x30], 0x100
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp dword [esp + 0x48], 1
jne 0x40d0c4
push 0x409c60
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
push ebx
push ebx
mov dword [0x443054], esi
push ebx
mov dword [esi + 0xc258], ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [esi + 0xc0a4], eax
lea edi, [esi + 0xc1f8]
lea ebp, [esi + 0xc1e0]
mov dword [esp + 0x18], 6
mov dword [ebp], ebx
xor eax, eax
mov ecx, edi
mov dword [ecx], eax
mov dword [ecx + 4], eax
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], eax
push str.127.0.0.1
mov word [edi], 2
call sub.WS2_32.dll_inet_addr
mov dword [edi + 4], eax
mov eax, dword [esp + 0x18]
add ebp, 4
add edi, 0x10
dec eax
mov dword [esp + 0x18], eax
jne 0x40d0f3
push ebx
push 2
push 2
call sub.WS2_32.dll_socket
cmp eax, ebx
mov dword [esi + 0xc1dc], eax
jl 0x40d5e3
lea edx, [esp + 0x50]
push edx
mov ebp, 0x400
push 0x443058
mov dword [esp + 0x58], ebp
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
push ebx
push ebx
push ebp
push 0x443858
push 0xffffffffffffffff
push 0x443058
push ebx
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x3c], esp
push 0x443858
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
call fcn.004094d0
mov edx, eax
xor eax, eax
mov byte [esp + 0x4cc], bl
mov ecx, 0xff
lea edi, [esp + 0x4cd]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0xa
lea eax, [esp + 0x4d0]
push eax
push edx
call dword [sym.imp.MSVCR71.dll__itoa]
add esp, 0x28
lea ecx, [esp + 0x28]
push ecx
push str.S_1_5_18
mov dword [esp + 0x24], ebp
call dword [sym.imp.ADVAPI32.dll_ConvertStringSidToSidA]
lea edx, [esp + 0xac]
push edx
lea eax, [esp + 0x20]
push eax
push ebx
mov ecx, eax
mov eax, dword [esp + 0x34]
push ecx
lea edx, [esp + 0x18d0]
push edx
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_LookupAccountSidA]
mov ecx, dword [esp + 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
lea ebp, [esp + 0x18c0]
mov edi, 0x443858
lea ecx, [ecx]
mov dl, byte [edi]
mov cl, byte [ebp]
mov al, dl
cmp dl, cl
jne 0x40d239
cmp al, bl
je 0x40d235
mov cl, byte [edi + 1]
mov dl, byte [ebp + 1]
mov al, cl
cmp cl, dl
jne 0x40d239
add edi, 2
add ebp, 2
cmp al, bl
jne 0x40d210
xor eax, eax
jmp 0x40d23e
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x40d24f
mov byte [0x43e2a8], bl
mov ebp, 0x10
jmp 0x40d2c8
push str.Mutex
lea ecx, [esp + 0x30]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
lea edx, [esp + 0x10b8]
push edx
lea ecx, [esp + 0x30]
mov byte [esp + 0x1cd0], 9
call dword [sym.imp.MSVCP71.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_char_const__]
push 8
call fcn.0042abe2
add esp, 4
mov dword [esp + 0x20], eax
cmp eax, ebx
mov byte [esp + 0x1ccc], 0xa
mov ebp, 0x10
je 0x40d2af
cmp dword [esp + 0x44], ebp
mov ecx, dword [esp + 0x30]
jae 0x40d2a5
lea ecx, [esp + 0x30]
push ecx
mov ecx, eax
call fcn.0040e370
jmp 0x40d2b1
xor eax, eax
lea ecx, [esp + 0x2c]
mov dword [0x443ca0], eax
mov byte [esp + 0x1ccc], 8
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
xor eax, eax
mov byte [esp + 0xb0], bl
mov ecx, 0xff
lea edi, [esp + 0xb1]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0xb0]
push eax
push ebx
push ebx
push 0x2e
push ebx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
test eax, eax
jl 0x40d3ec
lea ecx, [esp + 0xb0]
push ecx
mov ecx, 0x443d20
call dword [0x42e160]
push 0x434a3c
mov ecx, 0x443d20
call dword [sym.imp.MSVCP71.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_char_const__]
cmp dword [0x443d38], ebp
mov eax, dword [0x443d24]
jae 0x40d332
mov eax, 0x443d24
mov edi, dword [sym.imp.MSVCR71.dll__mkdir]
push eax
call edi
add esp, 4
push str.DigitalHome
mov ecx, 0x443d20
call dword [sym.imp.MSVCP71.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_char_const__]
cmp dword [0x443d38], ebp
mov eax, dword [0x443d24]
jae 0x40d360
mov eax, 0x443d24
push eax
call edi
add esp, 4
push 0x434a6c
mov ecx, 0x443d20
call dword [sym.imp.MSVCP71.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_char_const__]
lea edx, [esp + 0x10b8]
push edx
mov ecx, 0x443d20
call dword [sym.imp.MSVCP71.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_char_const__]
cmp dword [0x443d38], ebp
mov eax, dword [0x443d24]
jae 0x40d39b
mov eax, 0x443d24
push eax
call edi
add esp, 4
push 0x443d20
mov ecx, 0x443cf8
call dword [sym.imp.MSVCP71.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
push 0x434a6c
mov ecx, 0x443d20
call dword [sym.imp.MSVCP71.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_char_const__]
lea eax, [esp + 0x4b0]
push eax
mov ecx, 0x443d20
call dword [sym.imp.MSVCP71.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_char_const__]
cmp dword [0x443d38], ebp
mov eax, dword [0x443d24]
jae 0x40d3e6
mov eax, 0x443d24
push eax
call edi
add esp, 4
call fcn.0040acd0
push str.GeneralInfo.ini
lea ecx, [esp + 0x58]
push 0x443cf8
push ecx
call fcn.00401b00
add esp, 0xc
cmp byte [0x43e2a8], bl
mov eax, dword [esp + 0x6c]
mov byte [esp + 0x1ccc], 0xb
je 0x40d430
cmp eax, ebp
mov eax, dword [esp + 0x58]
jae 0x40d428
lea eax, [esp + 0x58]
push eax
push 0x4348c8
jmp 0x40d442
cmp eax, ebp
mov eax, dword [esp + 0x58]
jae 0x40d43c
lea eax, [esp + 0x58]
push eax
push 0x42f6d4
push str.RunBySystem
push str.Settings
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
push str.CLMSClient.ini
lea edx, [esp + 0x30]
push 0x443d20
push edx
call fcn.00401b00
add esp, 0xc
push eax
mov ecx, 0x443cc0
mov byte [esp + 0x1cd0], 0xc
call dword [sym.imp.MSVCP71.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
lea ecx, [esp + 0x2c]
mov byte [esp + 0x1ccc], 0xb
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
push str.CLMSServer.ini
lea eax, [esp + 0x30]
push 0x443d20
push eax
call fcn.00401b00
add esp, 0xc
push eax
lea ecx, [esi + 0xc260]
mov byte [esp + 0x1cd0], 0xd
call dword [sym.imp.MSVCP71.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
lea ecx, [esp + 0x2c]
mov byte [esp + 0x1ccc], 0xb
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
push str.CLMediaServer.ini
lea ecx, [esp + 0x30]
push 0x443d20
push ecx
call fcn.00401b00
add esp, 0xc
push eax
mov ecx, 0x443d3c
mov byte [esp + 0x1cd0], 0xe
call dword [sym.imp.MSVCP71.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
lea ecx, [esp + 0x2c]
mov byte [esp + 0x1ccc], 0xb
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
push str.PCMMediaServer.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
cmp eax, ebx
mov dword [0x443048], eax
jne 0x40d530
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [0x443048], ebx
jmp 0x40d5d1
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.CreateCPCMMediaServer
push eax
call edi
mov edx, dword [0x443048]
push str.DeleteCPCMMediaServer
push edx
mov dword [0x443050], eax
call edi
mov dword [0x44304c], eax
cmp dword [0x443050], ebx
jne 0x40d572
mov eax, dword [0x443048]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [0x443048], ebx
jmp 0x40d5d1
push 4
call fcn.0042abe2
add esp, 4
cmp eax, ebx
je 0x40d588
mov dword [eax], 0x433558
jmp 0x40d58a
xor eax, eax
push 0x443c58
mov dword [0x443c9c], eax
call dword [0x443050]
mov ecx, dword [0x443c58]
add esp, 4
cmp ecx, ebx
je 0x40d5d1
cmp dword [0x443d38], ebp
mov eax, dword [0x443d24]
jae 0x40d5b9
mov eax, 0x443d24
mov edx, dword [ecx]
push eax
xor eax, eax
mov al, byte [0x43e2a8]
push eax
push 0x408610
push 0x408530
call dword [edx + 0x2c]
lea ecx, [esp + 0x54]
mov byte [esp + 0x1ccc], 8
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [esp + 0x70]
mov byte [esp + 0x1ccc], 4
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [esp + 0x8c]
mov byte [esp + 0x1ccc], 3
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov ecx, dword [esp + 0x1cc4]
pop edi
mov eax, esi
mov dword fs:[0], ecx
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret