Function at 0x4bda40
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 0x537114
mov eax, dword fs:[0]
push eax
sub esp, 0x238
mov eax, dword [0x58c250]
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
mov ebx, ecx
xor esi, esi
push esi
lea ecx, [ebx + 8]
mov dword [ebp - 0x228], ebx
mov dword [ebx], vtable.CRPCClient.0
call fcn.004a7ef0
mov dword [ebp - 4], esi
mov eax, dword [0x58c214]
mov edx, dword [eax + 0xc]
lea edi, [ebx + 0xc]
mov ecx, 0x58c214
mov dword [ebp - 0x220], edi
call edx
add eax, 0x10
mov dword [edi], eax
mov byte [ebp - 4], 2
mov eax, dword [0x58c214]
mov edx, dword [eax + 0xc]
lea edi, [ebx + 0x10]
mov ecx, 0x58c214
mov dword [ebp - 0x220], edi
call edx
add eax, 0x10
mov dword [edi], eax
mov byte [ebp - 4], 4
push 0x53d168
lea ecx, [ebx + 0x14]
call fcn.00411460
mov byte [ebp - 4], 5
mov dword [ebx + 0x20], esi
mov dword [ebx + 0x24], esi
mov eax, dword [0x58c214]
mov edx, dword [eax + 0xc]
lea edi, [ebx + 0x28]
mov ecx, 0x58c214
mov dword [ebp - 0x220], 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 [0x58c214]
mov edx, dword [eax + 0xc]
lea edi, [ebx + 0x44]
mov ecx, 0x58c214
mov dword [ebp - 0x220], 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 - 0x21c], edi
mov dword [edi + 8], esi
call fcn.004f1c23
add esp, 4
cmp eax, esi
je 0x4bdfaf
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 - 0x244], edi
mov dword [edi + 8], esi
call fcn.004f1c23
add esp, 4
cmp eax, esi
je 0x4bdf74
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 - 0x214]
push esi
push eax
mov dword [ebp - 0x218], esi
call fcn.004f0550
add esp, 0xc
push 1
push 0x1a
lea ecx, [ebp - 0x218]
push ecx
push esi
mov dword [ebx + 4], esi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea edi, [ebp - 0x218]
add edi, 0xfffffffe
jmp 0x4bdc30
mov ax, word [edi + 2]
add edi, 2
cmp ax, si
jne 0x4bdc30
mov edx, dword [0x53bb00]
mov eax, str.StaffCop
mov dword [edi], edx
mov edi, eax
jmp 0x4bdc50
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x4bdc50
sub eax, edi
mov edx, edi
lea edi, [ebp - 0x218]
add edi, 0xfffffffe
jmp 0x4bdc70
mov cx, word [edi + 2]
add edi, 2
cmp cx, si
jne 0x4bdc70
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 - 0x218]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x4bdc95
mov eax, dword [0x53bb00]
mov dword [edi], eax
mov eax, 0x54531c
mov edx, eax
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4bdcb0
lea edi, [ebp - 0x218]
sub eax, edx
add edi, 0xfffffffe
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x4bdcc6
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 - 0x218]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea edi, [ebp - 0x218]
add edi, 0xfffffffe
lea ebx, [ebx]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x4bdd00
mov edx, dword [0x53bb00]
mov eax, str.CRPCClient.log
mov dword [edi], edx
mov edx, eax
jmp 0x4bdd20
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4bdd20
lea edi, [ebp - 0x218]
sub eax, edx
add edi, 0xfffffffe
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x4bdd36
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 - 0x218]
rep movsb byte es:[edi], byte [esi]
lea edx, [eax + 2]
jmp 0x4bdd60
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4bdd60
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebx + 0x44]
call fcn.00401e30
push 0x208
lea edi, [ebx + 0x5c]
push 0
push edi
call fcn.004f0550
mov edx, dword [0x58c214]
mov eax, dword [edx + 0xc]
add esp, 0xc
mov ecx, 0x58c214
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x21c], esi
mov byte [ebp - 4], 0x15
lea ecx, [ebp - 0x224]
push ecx
call fcn.004b45f0
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x104
add esp, 4
or eax, ecx
jge 0x4bdde8
push 0x104
lea ecx, [ebp - 0x21c]
call fcn.004018b0
mov esi, dword [ebp - 0x21c]
mov edx, dword [ebp - 0x224]
push 0x104
push esi
push str.LogsDir
push edx
call fcn.004b4490
add esp, 0x10
test eax, eax
jne 0x4bde64
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 0x4bde15
mov eax, dword [0x53bb00]
mov dword [edi], eax
mov eax, str.StaffCop
mov edx, eax
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4bde30
sub eax, edx
lea edi, [ebx + 0x5a]
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x4bde40
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 - 0x21c]
jmp 0x4bdeaf
test esi, esi
jne 0x4bde6c
xor eax, eax
jmp 0x4bde86
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4bde71
sub eax, edx
sar eax, 1
js 0x4bdf6a
cmp eax, dword [esi - 8]
jg 0x4bdf6a
xor ecx, ecx
mov dword [esi - 0xc], eax
lea edx, [ebx + 0x5c]
mov word [esi + eax*2], cx
mov eax, esi
sub edx, esi
nop
movzx ecx, word [eax]
mov word [eax + edx], cx
add eax, 2
test cx, cx
jne 0x4bdea0
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 0x4bdec0
mov edx, dword [str.Data_]
mov dword [eax], edx
mov ecx, dword [0x53cdfc]
mov dword [eax + 4], ecx
mov edx, dword [0x53ce00]
mov dword [eax + 8], edx
mov cx, word [0x53ce04]
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.004f3070
mov eax, dword [ebp - 0x224]
add esp, 0xc
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [0x590670], 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 0x4bdf45
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
mov dword [ebp - 4], 0xffffffff
mov eax, ebx
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.004f0194
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.004013f0
lea eax, [ebp - 0x21c]
push eax
lea ecx, [ebp - 0x240]
mov dword [ebp - 0x21c], esi
call fcn.004f16a5
mov byte [ebp - 4], 0xf
mov dword [ebp - method.std::bad_alloc.virtual_0], vtable.std::bad_alloc.0
mov byte [ebp - 4], 0xe
push 0x566444
lea ecx, [ebp - 0x240]
push ecx
call fcn.004f08d9
lea edx, [ebp - 0x220]
push edx
lea ecx, [ebp - 0x234]
mov dword [ebp - 0x220], esi
call fcn.004f16a5
mov byte [ebp - 4], 0xb
mov dword [ebp - method.std::bad_alloc.virtual_0], vtable.std::bad_alloc.0
mov byte [ebp - 4], 0xa
push 0x566444
lea eax, [ebp - 0x234]
push eax
call fcn.004f08d9
int3