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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4f87d9
mov eax, dword fs:[0]
push eax
mov eax, 0x1040
call fcn.004cc790
mov eax, dword [0x534090]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov edi, dword [ebp + 8]
mov dword [ebp - 0x1048], edi
mov dword [ebp - 0x1044], 0
mov dword [edi], 0
xor eax, eax
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 7
mov word [edi], ax
push ecx
mov dword [ebp - 4], eax
mov ecx, edi
mov dword [ebp - 0x1044], 1
call fcn.00435a90
mov eax, dword [ebx + 0x34]
mov ecx, edi
push 4
push 0x51535c
mov esi, dword [eax + 8]
call fcn.0043add0
test esi, esi
mov esi, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
jne 0x435ea6
mov eax, dword [ebx + 0x34]
mov edx, dword [eax + 0x20]
cmp word [edx], 0
je 0x435e13
mov ecx, edx
lea esi, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x435df0
sub ecx, esi
sar ecx, 1
push ecx
push edx
mov ecx, edi
call fcn.0043a570
mov esi, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
jmp 0x435f08
push 0x800
lea eax, [ebp - 0x81c]
push 0
push eax
call fcn.004cd810
mov esi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea eax, [ebp - 0x81c]
add esp, 0xc
push 0x400
push eax
push str._programdata_BDLogging
call esi
lea eax, [ebp - 0x81c]
push str._programdata_
push eax
call fcn.004cce77
add esp, 8
test eax, eax
je 0x435e76
xor eax, eax
mov word [ebp - 0x81c], ax
lea eax, [ebp - 0x81c]
push 0x400
push eax
push str._ALLUSERSPROFILE_Application_DataBDLogging
call esi
lea ecx, [ebp - 0x81c]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x435e80
sub ecx, edx
lea eax, [ebp - 0x81c]
sar ecx, 1
push ecx
push eax
mov ecx, edi
call fcn.0043a570
mov esi, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
jmp 0x435f08
push 4
lea eax, [ebp - 0x1c]
xorps xmm0, xmm0
push eax
push 0
movlpd qword [ebp - 0x1c], xmm0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [ebp - 0x1c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x435ec2
sub ecx, edx
lea eax, [ebp - 0x1c]
sar ecx, 1
push ecx
push eax
mov ecx, edi
call fcn.0043a570
push 0xb
push str.ProgramData
mov ecx, edi
call fcn.0043a570
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x435ef5
mov eax, dword [edi]
push 0
push eax
call esi
push 0xa
push str.BDLogging
mov ecx, edi
call fcn.0043a570
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x435f12
mov eax, dword [edi]
push 0
push eax
call esi
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x435f21
mov eax, dword [edi]
push 0x2000
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov ebx, dword [edi + 0x14]
mov eax, edi
cmp ebx, 8
jb 0x435f39
mov eax, dword [edi]
mov ecx, dword [edi + 0x10]
mov edx, SysReAllocString
mov dword [ebp - 0x1040], ecx
cmp word [eax + ecx*2 - 2], 0x5c
je 0x436044
cmp ecx, ebx
jae 0x435f72
lea eax, [ecx + 1]
mov dword [edi + 0x10], eax
mov eax, edi
cmp ebx, 8
jb 0x435f66
mov eax, dword [edi]
mov dword [eax + ecx*2], 0x5c
jmp 0x436044
mov eax, edx
sub eax, ecx
cmp eax, 1
jb 0x43663a
lea eax, [ecx + 1]
mov esi, eax
mov dword [ebp - 0x1038], eax
or esi, 7
cmp esi, edx
jbe 0x435f95
mov esi, edx
jmp 0x435fad
mov ecx, ebx
mov eax, edx
shr ecx, 1
sub eax, ecx
cmp ebx, eax
jbe 0x435fa5
mov esi, edx
jmp 0x435fad
lea eax, [ecx + ebx]
cmp esi, eax
cmovb esi, eax
lea eax, [esi + 1]
mov ecx, edi
push eax
call fcn.0043ad40
mov ecx, eax
mov dword [edi + 0x14], esi
mov eax, dword [ebp - 0x1038]
mov dword [edi + 0x10], eax
mov eax, dword [ebp - 0x1040]
add eax, eax
mov dword [ebp - 0x103c], ecx
push eax
lea esi, [ecx + eax]
mov dword [ebp - 0x1038], esi
cmp ebx, 8
jb 0x43602c
mov esi, dword [edi]
push esi
push ecx
call fcn.004cd290
mov eax, dword [ebp - 0x1038]
lea ebx, [ebx*2 + 2]
add esp, 0xc
mov dword [eax], 0x5c
cmp ebx, 0x1000
jb 0x436020
mov ecx, dword [esi - 4]
add ebx, 0x23
sub esi, ecx
lea eax, [esi - 4]
cmp eax, 0x1f
ja 0x436644
mov esi, ecx
push ebx
push esi
call fcn.004cb66f
add esp, 8
jmp 0x43603c
push edi
push ecx
call fcn.004cd290
add esp, 0xc
mov dword [esi], 0x5c
mov eax, dword [ebp - 0x103c]
mov dword [edi], eax
push 7
push str.CstLogs
mov ecx, edi
call fcn.0043a570
mov ebx, dword [edi + 0x14]
mov eax, edi
cmp ebx, 8
jb 0x43605e
mov eax, dword [edi]
mov ecx, dword [edi + 0x10]
mov dword [ebp - 0x1040], ecx
cmp word [eax + ecx*2 - 2], 0x5c
je 0x436169
cmp ecx, ebx
jae 0x436092
lea eax, [ecx + 1]
mov dword [edi + 0x10], eax
mov eax, edi
cmp ebx, 8
jb 0x436086
mov eax, dword [edi]
mov dword [eax + ecx*2], 0x5c
jmp 0x436169
mov edx, SysReAllocString
mov eax, edx
sub eax, ecx
cmp eax, 1
jb 0x43663a
lea eax, [ecx + 1]
mov esi, eax
mov dword [ebp - 0x1038], eax
or esi, 7
cmp esi, edx
jbe 0x4360ba
mov esi, edx
jmp 0x4360d2
mov ecx, ebx
mov eax, edx
shr ecx, 1
sub eax, ecx
cmp ebx, eax
jbe 0x4360ca
mov esi, edx
jmp 0x4360d2
lea eax, [ebx + ecx]
cmp esi, eax
cmovb esi, eax
lea eax, [esi + 1]
mov ecx, edi
push eax
call fcn.0043ad40
mov ecx, eax
mov dword [edi + 0x14], esi
mov eax, dword [ebp - 0x1038]
mov dword [edi + 0x10], eax
mov eax, dword [ebp - 0x1040]
add eax, eax
mov dword [ebp - 0x103c], ecx
push eax
lea esi, [eax + ecx]
mov dword [ebp - 0x1038], esi
cmp ebx, 8
jb 0x436151
mov esi, dword [edi]
push esi
push ecx
call fcn.004cd290
mov eax, dword [ebp - 0x1038]
lea ebx, [ebx*2 + 2]
add esp, 0xc
mov dword [eax], 0x5c
cmp ebx, 0x1000
jb 0x436145
mov ecx, dword [esi - 4]
add ebx, 0x23
sub esi, ecx
lea eax, [esi - 4]
cmp eax, 0x1f
ja 0x436644
mov esi, ecx
push ebx
push esi
call fcn.004cb66f
add esp, 8
jmp 0x436161
push edi
push ecx
call fcn.004cd290
add esp, 0xc
mov dword [esi], 0x5c
mov eax, dword [ebp - 0x103c]
mov dword [edi], eax
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x436173
mov eax, dword [edi]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x436186
mov eax, dword [edi]
mov ebx, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 0x2000
push eax
call ebx
push 0x1000
lea eax, [ebp - 0x101c]
push 0
push eax
call fcn.004cd810
add esp, 0xc
lea eax, [ebp - 0x101c]
push 0x800
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x101c]
push 0x5c
push eax
call fcn.004ccdd3
mov edx, eax
add esp, 8
test edx, edx
je 0x4361da
add edx, 2
jmp 0x4361e0
lea edx, [ebp - 0x101c]
mov dword [ebp - 0x1034], 0
mov ecx, edx
mov dword [ebp - 4], 2
xor eax, eax
mov dword [ebp - 0x1024], 0
mov dword [ebp - 0x1020], 7
mov word [ebp - 0x1034], ax
mov byte [ebp - 4], al
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x436216
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x1034]
call fcn.0043add0
mov dword [ebp - 0x1044], 3
mov dword [ebp - 4], 3
lea esi, [ebp - 0x1034]
mov ecx, dword [ebp - 0x1020]
cmp ecx, 8
jb 0x436262
mov esi, dword [ebp - 0x1034]
test esi, esi
je 0x4364f6
mov ecx, dword [edi + 0x14]
mov eax, edi
mov dword [ebp - 0x18], ecx
cmp ecx, 8
jb 0x436271
mov eax, dword [edi]
mov edx, dword [edi + 0x10]
mov dword [ebp - 0x103c], edx
cmp word [eax + edx*2 - 2], 0x5c
je 0x43639d
cmp edx, ecx
jae 0x4362a5
lea eax, [edx + 1]
mov dword [edi + 0x10], eax
mov eax, edi
cmp ecx, 8
jb 0x436299
mov eax, dword [edi]
mov dword [eax + edx*2], 0x5c
jmp 0x43639d
mov eax, SysReAllocString
sub eax, edx
cmp eax, 1
jb 0x43663f
lea eax, [edx + 1]
mov ebx, eax
mov dword [ebp - 0x1040], eax
or ebx, 7
cmp ebx, 0x7ffffffe
jbe 0x4362d2
mov ebx, SysReAllocString
jmp 0x4362f0
mov edx, ecx
mov eax, SysReAllocString
shr edx, 1
sub eax, edx
cmp ecx, eax
jbe 0x4362e8
mov ebx, SysReAllocString
jmp 0x4362f0
lea eax, [ecx + edx]
cmp ebx, eax
cmovb ebx, eax
lea eax, [ebx + 1]
mov ecx, edi
push eax
call fcn.0043ad40
mov ecx, eax
mov dword [edi + 0x14], ebx
mov eax, dword [ebp - 0x1040]
mov ebx, dword [ebp - 0x18]
mov dword [edi + 0x10], eax
mov eax, dword [ebp - 0x103c]
mov dword [ebp - 0x1038], ecx
lea edx, [eax + eax]
lea eax, [ecx + edx]
mov dword [ebp - 0x1040], eax
push edx
cmp ebx, 8
jb 0x43637f
mov eax, dword [edi]
push eax
push ecx
mov dword [ebp - 0x103c], eax
call fcn.004cd290
mov eax, dword [ebp - 0x1040]
lea ebx, [ebx*2 + 2]
add esp, 0xc
mov dword [eax], 0x5c
mov eax, dword [ebp - 0x103c]
cmp ebx, 0x1000
jb 0x436373
mov ecx, dword [eax - 4]
add ebx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x436644
mov eax, ecx
push ebx
push eax
call fcn.004cb66f
add esp, 8
jmp 0x436395
push edi
push ecx
call fcn.004cd290
mov eax, dword [ebp - 0x1040]
add esp, 0xc
mov dword [eax], 0x5c
mov eax, dword [ebp - 0x1038]
mov dword [edi], eax
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4363a2
sub ecx, edx
sar ecx, 1
push ecx
push esi
mov ecx, edi
call fcn.0043a570
mov ecx, dword [edi + 0x14]
mov eax, edi
mov dword [ebp - 0x18], ecx
cmp ecx, 8
jb 0x4363c9
mov eax, dword [edi]
mov ebx, dword [edi + 0x10]
cmp word [eax + ebx*2 - 2], 0x5c
je 0x4364bf
cmp ebx, ecx
jae 0x4363f7
lea eax, [ebx + 1]
mov dword [edi + 0x10], eax
mov eax, edi
cmp ecx, 8
jb 0x4363eb
mov eax, dword [edi]
mov dword [eax + ebx*2], 0x5c
jmp 0x4364bf
mov edx, SysReAllocString
mov eax, edx
sub eax, ebx
cmp eax, 1
jb 0x43663f
lea esi, [ebx + 1]
or esi, 7
cmp esi, edx
jbe 0x436417
mov esi, edx
jmp 0x43642f
mov eax, ecx
shr eax, 1
sub edx, eax
cmp ecx, edx
jbe 0x436428
mov esi, SysReAllocString
jmp 0x43642f
add eax, ecx
cmp esi, eax
cmovb esi, eax
lea eax, [esi + 1]
mov ecx, edi
push eax
call fcn.0043ad40
lea ecx, [ebx + 1]
mov dword [edi + 0x14], esi
mov dword [edi + 0x10], ecx
lea ecx, [ebx + ebx]
mov ebx, dword [ebp - 0x18]
mov dword [ebp - 0x1038], eax
lea esi, [ecx + eax]
mov dword [ebp - 0x1040], esi
push ecx
cmp ebx, 8
jb 0x4364a7
mov esi, dword [edi]
push esi
push eax
call fcn.004cd290
mov eax, dword [ebp - 0x1040]
lea ebx, [ebx*2 + 2]
add esp, 0xc
mov dword [eax], 0x5c
cmp ebx, 0x1000
jb 0x43649b
mov ecx, dword [esi - 4]
add ebx, 0x23
sub esi, ecx
lea eax, [esi - 4]
cmp eax, 0x1f
ja 0x436644
mov esi, ecx
push ebx
push esi
call fcn.004cb66f
add esp, 8
jmp 0x4364b7
push edi
push eax
call fcn.004cd290
add esp, 0xc
mov dword [esi], 0x5c
mov eax, dword [ebp - 0x1038]
mov dword [edi], eax
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x4364c9
mov eax, dword [edi]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x4364dc
mov eax, dword [edi]
mov ebx, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 0x2000
push eax
call ebx
mov ecx, dword [ebp - 0x1020]
mov esi, dword [ebp - 0x1034]
mov byte [ebp - 4], 0
cmp ecx, 8
jb 0x43652e
lea ecx, [ecx*2 + 2]
mov eax, esi
cmp ecx, 0x1000
jb 0x436524
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x436644
push ecx
push esi
call fcn.004cb66f
add esp, 8
mov eax, dword fs:[0x2c]
mov ecx, dword [eax]
mov eax, dword [0x538f28]
cmp eax, dword [ecx + 4]
jg 0x436649
push 0x538f2c
lea ecx, [ebp - 0x1034]
call fcn.0043a3c0
mov dword [ebp - 0x1044], 7
mov dword [ebp - 4], 5
lea esi, [ebp - 0x1034]
cmp dword [ebp - 0x1020], 8
jb 0x436585
mov esi, dword [ebp - 0x1034]
test esi, esi
je 0x43660f
cmp dword [edi + 0x14], 8
mov ecx, edi
jb 0x43658f
mov ecx, dword [edi]
mov eax, dword [edi + 0x10]
cmp word [ecx + eax*2 - 2], 0x5c
je 0x4365a3
push 0x5c
mov ecx, edi
call fcn.0043a900
mov ecx, esi
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4365b0
sub ecx, edx
sar ecx, 1
push ecx
push esi
mov ecx, edi
call fcn.0043a570
mov ecx, dword [edi + 0x14]
mov edx, edi
cmp ecx, 8
jb 0x4365d4
mov edx, dword [edi]
mov eax, dword [edi + 0x10]
cmp word [edx + eax*2 - 2], 0x5c
je 0x4365eb
push 0x5c
mov ecx, edi
call fcn.0043a900
mov ecx, dword [edi + 0x14]
mov eax, edi
cmp ecx, 8
jb 0x4365f4
mov eax, dword [edi]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x436607
mov eax, dword [edi]
push 0x2000
push eax
call ebx
lea ecx, [ebp - 0x1034]
call fcn.0043b020
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004cb63e
mov esp, ebp
pop ebp
ret 4
call fcn.0043abf0
call fcn.0043abf0
call fcn.004d05ef
push 0x538f28
call fcn.004cb7e5
add esp, 4
cmp dword [0x538f28], 0xffffffff
jne 0x436547
push ecx
mov dword [ebp - 4], 4
call fcn.00435be0
push 0x502ed0
call fcn.004cbaf7
add esp, 4
mov byte [ebp - 4], 0
push 0x538f28
call fcn.004cb79b
add esp, 4
jmp 0x436547