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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c3a39
mov eax, dword fs:[0]
push eax
mov eax, 0x1050
call fcn.00451020
mov eax, dword [0x4f4164]
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.00483ba0
mov eax, dword [esi + 0x34]
mov ecx, edi
push 4
push 0x4d37f4
mov esi, dword [eax + 8]
call fcn.004038a0
test esi, esi
jne 0x477a3d
mov esi, dword [ebp - 0x103c]
mov eax, dword [esi + 0x34]
mov edx, dword [eax + 0x20]
cmp word [edx], 0
je 0x4779b8
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0x1014], eax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x477997
sub ecx, dword [ebp - 0x1014]
sar ecx, 1
push ecx
push edx
mov ecx, edi
call fcn.004052f0
jmp 0x477ab5
push 0x800
lea eax, [ebp - 0x810]
push 0
push eax
call fcn.00495790
mov esi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea eax, [ebp - 0x810]
add esp, 0xc
push 0x400
push eax
push 0x4d3ab0
call esi
lea eax, [ebp - 0x810]
push str._programdata_
push eax
call fcn.00495bdc
add esp, 8
test eax, eax
je 0x477a1b
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 0x477a24
sub ecx, edx
lea eax, [ebp - 0x810]
sar ecx, 1
push ecx
push eax
jmp 0x477aa8
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 0x477a62
sub ecx, edx
lea eax, [ebp - 0x1018]
sar ecx, 1
push ecx
push eax
mov ecx, edi
call fcn.004052f0
push 0xb
push str.ProgramData
mov ecx, edi
call fcn.004052f0
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x477a98
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.004052f0
mov esi, dword [ebp - 0x103c]
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x477abf
mov eax, dword [edi]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x477ad2
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.0047b9e0
push 0x1000
lea eax, [ebp - 0x1010]
push 0
push eax
call fcn.00495790
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.004958ea
mov edx, eax
add esp, 8
test edx, edx
je 0x477b31
add edx, 2
jmp 0x477b37
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 0x477b63
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x1030]
call fcn.004038a0
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.0047b9e0
mov edx, dword [ebp - 0x101c]
mov byte [ebp - 4], 0
cmp edx, 8
jb 0x477bf6
mov ecx, dword [ebp - 0x1030]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x477bec
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x477dfb
push edx
push ecx
call fcn.00450975
add esp, 8
mov eax, dword fs:[0x2c]
mov ecx, dword [0x4f9024]
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x4f9b4c]
cmp eax, dword [ecx + 8]
jg 0x477cd1
jmp 0x477c31
mov ax, word [ecx]
add ecx, 2
test ax, ax
je 0x477dba
jmp 0x477c20
push 0x4f9b34
lea ecx, [ebp - 0x105c]
call fcn.00405c80
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.0047b9e0
mov edx, dword [ebp - 0x1048]
cmp edx, 8
jb 0x477cb2
mov ecx, dword [ebp - 0x105c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x477ca8
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x477dfb
push edx
push ecx
call fcn.00450975
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.00450df0
mov esp, ebp
pop ebp
ret 4
push 0x4f9b4c
call fcn.00450d1a
add esp, 4
cmp dword [0x4f9b4c], 0xffffffff
jne 0x477c31
push 0x100
lea eax, [ebp - 0x110]
mov dword [ebp - 4], 2
push 0
push eax
call fcn.00495790
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.0046fc90
lea ecx, [ebp - 0x110]
mov dword [0x4f9b34], 0
add esp, 0x24
mov dword [0x4f9b44], 0
mov dword [0x4f9b48], 7
lea edx, [ecx + 2]
jmp 0x477c20
sub ecx, edx
lea eax, [ebp - 0x110]
sar ecx, 1
push ecx
push eax
mov ecx, 0x4f9b34
call fcn.004038a0
mov esi, 0xb
push 0x4c6180
mov dword [ebp - 0x1040], esi
call fcn.00450bbf
push 0x4f9b4c
mov byte [ebp - 4], 0
call fcn.00450cd0
add esp, 8
jmp 0x477c31
call fcn.004984ff
int3