Function at 0x401000
Capabilities:
Get common file path
Print debug messages

Disassembly:
push 0xffffffffffffffff
push 0x4f07ec
mov eax, dword fs:[0]
push eax
sub esp, 0x9e8
mov eax, dword [0x536ed4]
xor eax, esp
mov dword [esp + 0x9e4], eax
push ebx
push esi
push edi
mov eax, dword [0x536ed4]
xor eax, esp
push eax
lea eax, [esp + 0x9f8]
mov dword fs:[0], eax
call fcn.004bb047
xor ecx, ecx
xor ebx, ebx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x401056
push 0x80004005
call fcn.00401730
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x10], eax
push 0x7cc
lea ecx, [esp + 0x22a]
push ebx
mov dword [esp + 0xa08], ebx
push ecx
mov word [esp + 0x230], bx
call fcn.004d1c40
add esp, 0xc
push 0x3e6
lea edx, [esp + 0x228]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [esp + 0x224]
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4010b0
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x228]
push eax
lea ecx, [esp + 0x18]
call fcn.00401e60
mov edi, dword [esp + 0x10]
mov esi, dword [edi - 0xc]
push 0x5c
push edi
call fcn.004cf088
add esp, 8
cmp eax, ebx
jne 0x4010ec
or eax, 0xffffffff
jmp 0x4010f0
sub eax, edi
sar eax, 1
sub esi, eax
sub esi, 1
push esi
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esp + 0x18]
call fcn.00401630
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0xa04], 1
call fcn.00401de0
mov byte [esp + 0xa00], bl
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40113d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push str..log
push str..exe
lea ecx, [esp + 0x18]
push ecx
call fcn.004013f0
push 0x206
lea edx, [esp + 0x22]
push ebx
push edx
mov word [esp + 0x28], bx
call fcn.004d1c40
add esp, 0xc
push ebx
push 0x10
lea eax, [esp + 0x24]
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea eax, [esp + 0x1c]
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x401180
sub eax, edx
sar eax, 1
cmp word [esp + eax*2 + 0x1a], 0x5c
jne 0x4011b4
lea eax, [esp + 0x1c]
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4011a0
sub eax, edx
sar eax, 1
mov word [esp + eax*2 + 0x1a], bx
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x1c]
call fcn.00401b10
mov byte [esp + 0xa00], 2
mov edi, dword [esp + 0x10]
push edi
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x20]
push 0x500d14
push eax
call fcn.00401af0
mov ecx, dword [esp + 0x28]
push 0x20
push str.atc
push ecx
call fcn.004cf0c7
add esp, 0x1c
cmp eax, ebx
mov dword [0x54ad5c], eax
jne 0x401278
call fcn.004bb047
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x40121a
push 0x80004005
call fcn.00401730
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x18]
push str.CDebugLog::OpenFile__s_failed
push edx
mov byte [esp + 0xa0c], 3
call fcn.00401af0
mov esi, dword [esp + 0x20]
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea eax, [esi - 0x10]
mov byte [esp + 0xa00], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401278
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xa00], bl
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40129f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
mov dword [esp + 0xa00], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4012c6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x9f8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x9e4]
xor ecx, esp
call fcn.004cf0b8
add esp, 0x9f4
ret