Function at 0x40b540
Capabilities:
Check if file exists
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44b761
mov eax, dword fs:[0]
push eax
sub esp, 0x498
mov eax, dword [0x46b0a4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
cmp dword [0x46d430], 0
jne 0x40b8a8
push 4
call fcn.00418c22
add esp, 4
mov dword [ebp - 0x4a4], eax
test eax, eax
je 0x40b596
mov dword [eax], 0
jmp 0x40b598
xor eax, eax
push str.LoggerDll.dll
lea ecx, [ebp - 0x488]
mov dword [0x46d430], eax
call fcn.00402a50
lea ecx, [ebp - 0x440]
push ecx
mov ecx, eax
mov edx, dword [eax]
mov eax, dword [edx]
call eax
mov esi, eax
push 0x400
lea eax, [ebp - 0x410]
mov dword [ebp - 4], 0
push 0
push eax
call fcn.00430e20
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
lea ecx, [ebp - 0x4a4]
push ecx
push eax
call sub.WTSAPI32.dll_WTSQueryUserToken
test eax, eax
lea eax, [ebp - 0x410]
push eax
push 0
je 0x40b619
push dword [ebp - 0x4a4]
push 0
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
push dword [ebp - 0x4a4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40b625
push 0
push 0
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
cmp dword [esi + 0x10], 0
je 0x40b641
cmp dword [esi + 0x14], 0x10
jb 0x40b633
mov esi, dword [esi]
push esi
lea eax, [ebp - 0x410]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
lea ecx, [ebp - 0x410]
mov dword [ebp - 0x418], 0
mov dword [ebp - 0x414], 0xf
lea edx, [ecx + 1]
mov byte [ebp - 0x428], 0
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40b665
sub ecx, edx
lea eax, [ebp - 0x410]
push ecx
push eax
lea ecx, [ebp - 0x428]
call fcn.0040e120
mov edx, dword [ebp - 0x42c]
mov byte [ebp - 4], 2
cmp edx, 0x10
jb 0x40b6bf
mov ecx, dword [ebp - 0x440]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40b6b5
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b8c8
push edx
push ecx
call fcn.00418c52
add esp, 8
cmp dword [ebp - 0x414], 0x10
lea eax, [ebp - 0x428]
mov dword [ebp - 0x430], 0
cmovae eax, dword [ebp - 0x428]
push eax
mov dword [ebp - 0x42c], 0xf
mov byte [ebp - 0x440], 0
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x40b785
push str.LoggerDll.dll
lea ecx, [ebp - 0x4a0]
call fcn.00402a50
lea ecx, [ebp - 0x470]
push ecx
mov ecx, eax
mov edx, dword [eax]
mov eax, dword [edx]
call eax
push eax
lea eax, [ebp - 0x458]
mov byte [ebp - 4], 3
push eax
call fcn.0040ace0
mov esi, eax
add esp, 8
lea eax, [ebp - 0x428]
cmp eax, esi
je 0x40b76b
mov ecx, eax
call fcn.00409620
movups xmm0, xmmword [esi]
movups xmmword [ebp - 0x428], xmm0
movq xmm0, qword [esi + 0x10]
movq qword [ebp - 0x418], xmm0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0xf
mov byte [esi], 0
lea ecx, [ebp - 0x458]
call fcn.00409620
lea ecx, [ebp - 0x470]
mov byte [ebp - 4], 2
call fcn.00409620
lea eax, [ebp - 0x428]
push eax
lea ecx, [ebp - 0x458]
call fcn.00408500
mov edx, dword [ebp - 0x444]
cmp edx, 0x10
jb 0x40b7d1
mov ecx, dword [ebp - 0x458]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40b7c7
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b8cd
push edx
push ecx
call fcn.00418c52
add esp, 8
cmp dword [ebp - 0x414], 0x10
lea eax, [ebp - 0x428]
cmovae eax, dword [ebp - 0x428]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
push str.GetCurLogFilePathSize
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
mov eax, 0x30
push 0x122
mov word [ebp - 0x134], ax
lea eax, [ebp - 0x132]
push 0
push eax
mov dword [ebp - 0x4a4], esi
call fcn.00430e20
add esp, 0xc
test esi, esi
je 0x40b85e
push 0x104
call fcn.00418c60
push 0x104
mov esi, eax
push 0
push esi
call fcn.00430e20
push esi
call dword [ebp - 0x4a4]
push esi
push eax
lea eax, [ebp - 0x134]
push str._u___s_
push eax
call fcn.00415700
add esp, 0x24
push str.WriteLog
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [0x46d430]
mov dword [ecx], eax
mov edx, dword [ebp - 0x414]
cmp edx, 0x10
jb 0x40b8a8
mov ecx, dword [ebp - 0x428]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40b89e
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b8d2
push edx
push ecx
call fcn.00418c52
add esp, 8
mov eax, dword [0x46d430]
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.00419373
mov esp, ebp
pop ebp
ret
call fcn.00434109
call fcn.00434109
call fcn.00434109
int3