Function at 0x4adf20
Capabilities:
Create directory
Query environment variable
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x503019
mov eax, dword fs:[0]
push eax
mov eax, 0x1050
call fcn.00499790
mov eax, dword [0x53d058]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x103c], esi
mov edi, dword [ebp + 8]
xor eax, eax
mov dword [ebp - 0x1044], edi
mov dword [ebp - 0x1040], 0
mov dword [edi], 0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 7
mov word [edi], ax
push 0x400
mov ecx, edi
mov dword [ebp - 4], eax
mov dword [ebp - 0x1040], 1
call fcn.004bb450
mov eax, dword [esi + 0x34]
mov ecx, edi
push 4
push 0x508de0
mov esi, dword [eax + 8]
call fcn.004034d0
test esi, esi
jne 0x4ae07d
mov esi, dword [ebp - 0x103c]
mov eax, dword [esi + 0x34]
mov edx, dword [eax + 0x20]
cmp word [edx], 0
je 0x4adff8
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0x1014], eax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4adfd7
sub ecx, dword [ebp - 0x1014]
sar ecx, 1
push ecx
push edx
mov ecx, edi
call fcn.0040ba70
jmp 0x4ae0f5
push 0x800
lea eax, [ebp - 0x810]
push 0
push eax
call fcn.004cdf10
mov esi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea eax, [ebp - 0x810]
add esp, 0xc
push 0x400
push eax
push str._programdata_BDLogging
call esi
lea eax, [ebp - 0x810]
push str._programdata_
push eax
call fcn.004cd4c1
add esp, 8
test eax, eax
je 0x4ae05b
xor eax, eax
mov word [ebp - 0x810], ax
lea eax, [ebp - 0x810]
push 0x400
push eax
push str._ALLUSERSPROFILE_Application_DataBDLogging
call esi
lea ecx, [ebp - 0x810]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4ae064
sub ecx, edx
lea eax, [ebp - 0x810]
sar ecx, 1
push ecx
push eax
jmp 0x4ae0e8
push 4
lea eax, [ebp - 0x1018]
xorps xmm0, xmm0
push eax
push 0
movlpd qword [ebp - 0x1018], xmm0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [ebp - 0x1018]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4ae0a2
sub ecx, edx
lea eax, [ebp - 0x1018]
sar ecx, 1
push ecx
push eax
mov ecx, edi
call fcn.0040ba70
push 0xb
push str.ProgramData
mov ecx, edi
call fcn.0040ba70
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x4ae0d8
mov eax, dword [edi]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push 0xa
push str.BDLogging
mov ecx, edi
call fcn.0040ba70
mov esi, dword [ebp - 0x103c]
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x4ae0ff
mov eax, dword [edi]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x4ae112
mov eax, dword [edi]
push 0x2000
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push str.CstLogs
push edi
mov ecx, esi
call fcn.004b2d40
push 0x1000
lea eax, [ebp - 0x1010]
push 0
push eax
call fcn.004cdf10
add esp, 0xc
lea eax, [ebp - 0x1010]
push 0x800
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x1010]
push 0x5c
push eax
call fcn.004cd41d
mov edx, eax
add esp, 8
test edx, edx
je 0x4ae171
add edx, 2
jmp 0x4ae177
lea edx, [ebp - 0x1010]
mov ecx, edx
mov dword [ebp - 0x1030], 0
xor eax, eax
mov dword [ebp - 0x1020], 0
mov dword [ebp - 0x101c], 7
mov word [ebp - 0x1030], ax
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4ae1a3
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x1030]
call fcn.004034d0
mov esi, 3
mov dword [ebp - 0x1040], esi
cmp dword [ebp - 0x101c], 8
lea eax, [ebp - 0x1030]
mov ecx, dword [ebp - 0x103c]
cmovae eax, dword [ebp - 0x1030]
push eax
push edi
mov dword [ebp - 4], 1
call fcn.004b2d40
mov edx, dword [ebp - 0x101c]
mov byte [ebp - 4], 0
cmp edx, 8
jb 0x4ae236
mov ecx, dword [ebp - 0x1030]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4ae22c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4ae43b
push edx
push ecx
call fcn.0049855b
add esp, 8
mov eax, dword fs:[0x2c]
mov ecx, dword [0x544624]
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x544b3c]
cmp eax, dword [ecx + 8]
jg 0x4ae311
jmp 0x4ae271
mov ax, word [ecx]
add ecx, 2
test ax, ax
je 0x4ae3fa
jmp 0x4ae260
push 0x544b24
lea ecx, [ebp - 0x105c]
call fcn.0040bca0
or esi, 4
mov dword [ebp - 0x1040], esi
cmp dword [ebp - 0x1048], 8
lea eax, [ebp - 0x105c]
mov ecx, dword [ebp - 0x103c]
cmovae eax, dword [ebp - 0x105c]
push eax
push edi
mov dword [ebp - 4], 3
call fcn.004b2d40
mov edx, dword [ebp - 0x1048]
cmp edx, 8
jb 0x4ae2f2
mov ecx, dword [ebp - 0x105c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4ae2e8
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4ae43b
push edx
push ecx
call fcn.0049855b
add esp, 8
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0049852a
mov esp, ebp
pop ebp
ret 4
push 0x544b3c
call fcn.0049892b
add esp, 4
cmp dword [0x544b3c], 0xffffffff
jne 0x4ae271
push 0x100
lea eax, [ebp - 0x110]
mov dword [ebp - 4], 2
push 0
push eax
call fcn.004cdf10
add esp, 0xc
lea eax, [ebp - 0x1018]
push eax
push eax
push eax
lea eax, [ebp - 0x1038]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcessTimes]
lea eax, [ebp - 0x1028]
xorps xmm0, xmm0
push eax
lea eax, [ebp - 0x1038]
push eax
movups xmmword [ebp - 0x1028], xmm0
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
movzx eax, word [ebp - 0x101c]
push eax
movzx eax, word [ebp - 0x101e]
push eax
movzx eax, word [ebp - 0x1020]
push eax
movzx eax, word [ebp - 0x1022]
push eax
movzx eax, word [ebp - 0x1026]
push eax
movzx eax, word [ebp - 0x1028]
push eax
lea eax, [ebp - 0x110]
push str._.2d__.2d__.2d__.2d__.2d__.2d___.4d
push eax
call fcn.004a5df0
lea ecx, [ebp - 0x110]
mov dword [0x544b24], 0
add esp, 0x24
mov dword [0x544b34], 0
mov dword [0x544b38], 7
lea edx, [ecx + 2]
jmp 0x4ae260
sub ecx, edx
lea eax, [ebp - 0x110]
sar ecx, 1
push ecx
push eax
mov ecx, 0x544b24
call fcn.004034d0
mov esi, 0xb
push 0x505890
mov dword [ebp - 0x1040], esi
call fcn.004987d5
push 0x544b3c
mov byte [ebp - 4], 0
call fcn.004988e1
add esp, 8
jmp 0x4ae271
call fcn.004d076f
int3