Function at 0x404240
Capabilities:
Create directory
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x437a3c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x228
mov eax, dword [0x44a2b0]
push edi
push 0
mov dword [esp + 0x22c], eax
push 0x1a
lea eax, [esp + 0x28]
push eax
push 0
mov edi, ecx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x4044fd
push ebp
push esi
call fcn.0042a8c9
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov ebp, 0x43a6d4
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], ebp
push 0x208
lea ecx, [esp + 0x18]
mov dword [esp + 0x240], 0
call fcn.00404850
call fcn.0042a8c9
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], ebp
push 0x201
lea ecx, [esp + 0x10]
mov byte [esp + 0x240], 1
call fcn.00404850
call fcn.0042a8c9
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], ebp
push 0x204
lea ecx, [esp + 0x20]
mov byte [esp + 0x240], 2
call fcn.00404850
lea eax, [esp + 0x28]
push eax
lea esi, [edi + 0xa4]
call fcn.0041c01e
add esp, 4
push eax
lea ecx, [esp + 0x2c]
push ecx
mov ecx, esi
call fcn.00401160
push 0x43ab3c
mov ecx, esi
call fcn.004040f0
mov eax, dword [esp + 0x18]
mov ecx, dword [eax - 0xc]
push ecx
push eax
mov ecx, esi
call fcn.00403be0
push 0x43ab3c
mov ecx, esi
call fcn.004040f0
lea edx, [esp + 0x24]
push edx
lea ecx, [edi + 0x58]
call fcn.00404180
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
push ecx
push eax
mov ecx, esi
mov byte [esp + 0x244], 3
call fcn.00403be0
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
or edi, 0xffffffff
mov byte [esp + 0x23c], 2
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4043a7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
push 0x43ab3c
mov ecx, esi
call fcn.004040f0
mov eax, dword [esp + 0x10]
mov ecx, dword [eax - 0xc]
push ecx
push eax
mov ecx, esi
call fcn.00403be0
mov eax, dword [esi]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x404462
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x404462
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov byte [esp + 0x23c], 1
mov dword [esp + 0x1c], ebp
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40440c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov byte [esp + 0x23c], 0
mov dword [esp + 0xc], ebp
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404435
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov dword [esp + 0x23c], edi
mov dword [esp + 0x14], ebp
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edi
dec edi
test edi, edi
jg 0x40445b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
xor eax, eax
jmp 0x4044fb
push 0x43ab3c
mov ecx, esi
call fcn.004040f0
mov eax, dword [esp + 0x20]
mov ecx, dword [eax - 0xc]
push ecx
push eax
mov ecx, esi
call fcn.00403be0
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov byte [esp + 0x23c], 1
mov dword [esp + 0x1c], ebp
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4044a7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov byte [esp + 0x23c], 0
mov dword [esp + 0xc], ebp
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4044d0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov dword [esp + 0x23c], edi
mov dword [esp + 0x14], ebp
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edi
dec edi
test edi, edi
jg 0x4044f6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, 1
pop esi
pop ebp
mov ecx, dword [esp + 0x22c]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x228]
pop edi
call fcn.0041c960
add esp, 0x234
ret