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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d7a29
mov eax, dword fs:[0]
push eax
mov eax, 0x1050
call fcn.004a6c20
mov eax, dword [0x507254]
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.00421720
mov eax, dword [esi + 0x34]
mov ecx, edi
push 4
push 0x4dc94c
mov esi, dword [eax + 8]
call fcn.00403940
test esi, esi
jne 0x470f8d
mov esi, dword [ebp - 0x103c]
mov eax, dword [esi + 0x34]
mov edx, dword [eax + 0x20]
cmp word [edx], 0
je 0x470f08
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0x1014], eax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x470ee7
sub ecx, dword [ebp - 0x1014]
sar ecx, 1
push ecx
push edx
mov ecx, edi
call fcn.00402df0
jmp 0x471005
push 0x800
lea eax, [ebp - 0x810]
push 0
push eax
call fcn.004a8a30
mov esi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea eax, [ebp - 0x810]
add esp, 0xc
push 0x400
push eax
push 0x4dcc2c
call esi
lea eax, [ebp - 0x810]
push str._programdata_
push eax
call fcn.004a81cb
add esp, 8
test eax, eax
je 0x470f6b
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 0x470f74
sub ecx, edx
lea eax, [ebp - 0x810]
sar ecx, 1
push ecx
push eax
jmp 0x470ff8
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 0x470fb2
sub ecx, edx
lea eax, [ebp - 0x1018]
sar ecx, 1
push ecx
push eax
mov ecx, edi
call fcn.00402df0
push 0xb
push str.ProgramData
mov ecx, edi
call fcn.00402df0
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x470fe8
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.00402df0
mov esi, dword [ebp - 0x103c]
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x47100f
mov eax, dword [edi]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x471022
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.00475c50
push 0x1000
lea eax, [ebp - 0x1010]
push 0
push eax
call fcn.004a8a30
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.004a7ff0
mov edx, eax
add esp, 8
test edx, edx
je 0x471081
add edx, 2
jmp 0x471087
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 0x4710b3
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x1030]
call fcn.00403940
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.00475c50
mov edx, dword [ebp - 0x101c]
mov byte [ebp - 4], 0
cmp edx, 8
jb 0x471146
mov ecx, dword [ebp - 0x1030]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x47113c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x47134b
push edx
push ecx
call fcn.004a6287
add esp, 8
mov eax, dword fs:[0x2c]
mov ecx, dword [0x50afb4]
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x50a99c]
cmp eax, dword [ecx + 0x58]
jg 0x471221
jmp 0x471181
mov ax, word [ecx]
add ecx, 2
test ax, ax
je 0x47130a
jmp 0x471170
push 0x50a984
lea ecx, [ebp - 0x105c]
call fcn.00403010
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.00475c50
mov edx, dword [ebp - 0x1048]
cmp edx, 8
jb 0x471202
mov ecx, dword [ebp - 0x105c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4711f8
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x47134b
push edx
push ecx
call fcn.004a6287
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.004a6256
mov esp, ebp
pop ebp
ret 4
push 0x50a99c
call fcn.004a6775
add esp, 4
cmp dword [0x50a99c], 0xffffffff
jne 0x471181
push 0x100
lea eax, [ebp - 0x110]
mov dword [ebp - 4], 2
push 0
push eax
call fcn.004a8a30
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.00468ce0
lea ecx, [ebp - 0x110]
mov dword [0x50a984], 0
add esp, 0x24
mov dword [0x50a994], 0
mov dword [0x50a998], 7
lea edx, [ecx + 2]
jmp 0x471170
sub ecx, edx
lea eax, [ebp - 0x110]
sar ecx, 1
push ecx
push eax
mov ecx, 0x50a984
call fcn.00403940
mov esi, 0xb
push 0x4db2a0
mov dword [ebp - 0x1040], esi
call fcn.004a650f
push 0x50a99c
mov byte [ebp - 4], 0
call fcn.004a672b
add esp, 8
jmp 0x471181
call fcn.004ab23f
int3