Function at 0x412d10
Capabilities:
Access peb ldr_data
Create directory
Get common file path
Get process heap flags
Get process heap force flags

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x64240f
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x234
push ebx
push esi
mov ebx, ecx
push edi
xor esi, esi
push esi
lea ecx, [ebx + 8]
mov dword [ebp - 0x1c], ebx
mov dword [ebx], vtable.CRPCClient.0
call fcn.005b2cd0
mov dword [ebp - 4], esi
mov eax, dword [0x700724]
mov edx, dword [eax + 0xc]
lea edi, [ebx + 0xc]
mov ecx, 0x700724
mov dword [ebp - 0x14], edi
call edx
add eax, 0x10
mov dword [edi], eax
mov byte [ebp - 4], 2
mov eax, dword [0x700724]
mov edx, dword [eax + 0xc]
lea edi, [ebx + 0x10]
mov ecx, 0x700724
mov dword [ebp - 0x14], edi
call edx
add eax, 0x10
mov dword [edi], eax
mov byte [ebp - 4], 4
push 0x66eba8
lea ecx, [ebx + 0x14]
call fcn.0040bea0
mov byte [ebp - 4], 5
mov dword [ebx + 0x20], esi
mov dword [ebx + 0x24], esi
mov eax, dword [0x700724]
mov edx, dword [eax + 0xc]
lea edi, [ebx + 0x28]
mov ecx, 0x700724
mov dword [ebp - 0x14], edi
call edx
add eax, 0x10
mov dword [edi], eax
mov byte [ebp - 4], 7
mov dword [ebx + 0x2c], esi
mov dword [ebx + 0x30], esi
mov dword [ebx + 0x34], esi
mov dword [ebx + 0x38], esi
mov dword [ebx + 0x3c], esi
mov byte [ebp - 4], 8
mov eax, dword [0x700724]
mov edx, dword [eax + 0xc]
lea edi, [ebx + 0x44]
mov ecx, 0x700724
mov dword [ebp - 0x14], edi
call edx
add eax, 0x10
mov dword [edi], eax
mov byte [ebp - 4], 0xa
lea edi, [ebx + 0x2d18]
mov dword [ebx + 0x48], 0xffffffff
mov dword [ebx + 0x2d0c], 0x30390443
mov byte [ebx + 0x2d10], 0
mov dword [ebx + 0x2d14], 0x10
push 0x18
mov dword [ebp - 0x10], edi
mov dword [edi + 8], esi
call fcn.00611c8b
add esp, 4
cmp eax, esi
je 0x413232
mov dword [edi + 4], eax
mov dword [eax], eax
mov eax, dword [edi + 4]
mov dword [eax + 4], eax
mov eax, dword [edi + 4]
mov dword [eax + 8], eax
mov edx, dword [edi + 4]
mov byte [edx + 0x14], 1
mov eax, dword [edi + 4]
mov byte [eax + 0x15], 1
mov byte [ebp - 4], 0xe
lea edi, [ebx + 0x2d28]
push 0x18
mov dword [ebp - 0x38], edi
mov dword [edi + 8], esi
call fcn.00611c8b
add esp, 4
cmp eax, esi
je 0x413206
mov dword [edi + 4], eax
mov dword [eax], eax
mov eax, dword [edi + 4]
mov dword [eax + 4], eax
mov eax, dword [edi + 4]
mov dword [eax + 8], eax
mov ecx, dword [edi + 4]
mov byte [ecx + 0x14], 1
mov edx, dword [edi + 4]
mov byte [edx + 0x15], 1
mov byte [ebp - 4], 0x12
mov dword [ebx + 0x2f40], esi
mov dword [ebx + 0x2f44], esi
mov byte [ebp - 4], 0x13
push 0x204
lea eax, [ebp - 0x23c]
push esi
push eax
mov dword [ebp - 0x240], esi
call fcn.006100a0
add esp, 0xc
push 1
push 0x1a
lea ecx, [ebp - 0x240]
push ecx
push esi
mov dword [ebx + 4], esi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea edi, [ebp - 0x240]
add edi, 0xfffffffe
lea esp, [esp]
mov ax, word [edi + 2]
add edi, 2
cmp ax, si
jne 0x412ee0
mov edx, dword [0x66ea40]
mov eax, 0x66e1d4
mov dword [edi], edx
mov edi, eax
jmp 0x412f00
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x412f00
sub eax, edi
mov edx, edi
lea edi, [ebp - 0x240]
add edi, 0xfffffffe
jmp 0x412f20
mov cx, word [edi + 2]
add edi, 2
cmp cx, si
jne 0x412f20
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x240]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x412f45
mov eax, dword [0x66ea40]
mov dword [edi], eax
mov eax, 0x66e1e8
mov edx, eax
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x412f60
lea edi, [ebp - 0x240]
sub eax, edx
add edi, 0xfffffffe
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x412f76
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 0
lea ecx, [ebp - 0x240]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea edi, [ebp - 0x240]
add edi, 0xfffffffe
lea ebx, [ebx]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x412fb0
mov edx, dword [0x66ea40]
mov eax, str.CRPCClient.log
mov dword [edi], edx
mov edx, eax
jmp 0x412fd0
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x412fd0
lea edi, [ebp - 0x240]
sub eax, edx
add edi, 0xfffffffe
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x412fe6
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [ebp - 0x240]
rep movsb byte es:[edi], byte [esi]
lea edx, [eax + 2]
jmp 0x413010
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x413010
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x240]
push eax
lea ecx, [ebx + 0x44]
call fcn.00401670
push 0x208
lea edi, [ebx + 0x5c]
push 0
push edi
call fcn.006100a0
mov edx, dword [0x700724]
mov eax, dword [edx + 0xc]
add esp, 0xc
mov ecx, 0x700724
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x10], esi
mov byte [ebp - 4], 0x15
lea ecx, [ebp - 0x18]
push ecx
call fcn.005bd6c0
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x104
add esp, 4
or eax, ecx
jge 0x41308c
push 0x104
lea ecx, [ebp - 0x10]
call fcn.00401400
mov esi, dword [ebp - 0x10]
mov edx, dword [ebp - 0x18]
push 0x104
push esi
push str.LogsDir
push edx
call fcn.005bd4f0
add esp, 0x10
test eax, eax
jne 0x413101
push edi
push eax
push eax
push 0x1a
push eax
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x4130b6
mov eax, dword [0x66ea40]
mov dword [edi], eax
mov eax, 0x66e1d4
mov edx, eax
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4130d0
sub eax, edx
lea edi, [ebx + 0x5a]
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x4130e0
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 0x10]
jmp 0x41314f
test esi, esi
jne 0x413109
xor eax, eax
jmp 0x413125
mov eax, esi
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x413110
sub eax, edx
sar eax, 1
js 0x4131fc
cmp eax, dword [esi - 8]
jg 0x4131fc
xor ecx, ecx
mov dword [esi - 0xc], eax
lea edx, [ebx + 0x5c]
mov word [esi + eax*2], cx
mov eax, esi
sub edx, esi
mov edi, edi
movzx ecx, word [eax]
mov word [eax + edx], cx
add eax, 2
test cx, cx
jne 0x413140
push 0
lea edi, [ebx + 0x5c]
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea eax, [edi - 2]
mov edi, edi
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x413160
mov edx, dword [str.Data_]
mov dword [eax], edx
mov ecx, dword [0x66f134]
mov dword [eax + 4], ecx
mov edx, dword [0x66f138]
mov dword [eax + 8], edx
mov cx, word [0x66f13c]
push 0
lea edi, [ebx + 0x5c]
push edi
mov word [eax + 0xc], cx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push 0x104
lea edx, [ebx + 0x2d38]
push edi
push edx
call fcn.006125de
mov eax, dword [ebp - 0x18]
add esp, 0xc
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [0x701dc0], ebx
mov byte [ebp - 4], 0x13
add esi, 0xfffffff0
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4131e2
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov eax, ebx
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.004011d0
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x10], esi
call fcn.00610cdf
mov byte [ebp - 4], 0xf
mov dword [ebp - 0x28], vtable.std::bad_alloc.0
mov byte [ebp - 4], 0xe
push 0x6b9848
lea ecx, [ebp - 0x28]
push ecx
call fcn.0060fb01
lea edx, [ebp - 0x14]
push edx
lea ecx, [ebp - 0x34]
mov dword [ebp - 0x14], esi
call fcn.00610cdf
mov byte [ebp - 4], 0xb
mov dword [ebp - 0x34], vtable.std::bad_alloc.0
mov byte [ebp - 4], 0xa
push 0x6b9848
lea eax, [ebp - 0x34]
push eax
call fcn.0060fb01
int3