Function at 0x100cadd0
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2c
mov eax, dword [0x103b1004]
xor eax, esp
mov dword [esp + 0x28], eax
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, edx
push edi
xor edi, edi
mov dword [esp + 0x20], esi
mov dword [esp + 0xc], 0
mov dword [esp + 0x1c], edi
mov dword [esp + 0x10], edi
test ebx, ebx
je 0x100cb054
test esi, esi
je 0x100cb054
push 4
push 0x10370334
push ebx
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncmp]
add esp, 0xc
test eax, eax
je 0x100cb054
push esi
push ebx
push 0x10375278
push str._winapi.CreateJunction
call sym.python310.dll_PySys_Audit
add esp, 0x10
test eax, eax
jns 0x100cae57
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.1024a596
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0xc]
push eax
push 0x20
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x100cafe8
lea eax, [esp + 0x28]
push eax
push str.SeRestorePrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
je 0x100cafe8
push 0
push 0
push 0x10
lea eax, [esp + 0x30]
mov dword [esp + 0x30], 1
push eax
push 0
push dword [esp + 0x20]
mov dword [esp + 0x48], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
je 0x100cafe8
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x100cafe8
push 0
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
movzx esi, ax
test si, si
je 0x100cafe8
add esi, 0xffff
mov dword [esp + 0x14], esi
lea eax, [esi*4 + 0x1c]
movzx eax, ax
mov dword [esp + 0x18], eax
movzx eax, ax
push eax
push 1
call sym.python310.dll_PyMem_RawCalloc
mov edi, eax
add esp, 8
test edi, edi
je 0x100cafe8
mov ecx, dword [esp + 0x18]
xor eax, eax
mov word [edi + 8], ax
add ecx, 0xfffffff8
mov word [edi + 4], cx
lea ecx, [esi + esi]
lea eax, [ecx + 8]
mov dword [edi], 0xa0000003
mov word [edi + 0xa], ax
lea esi, [edi + 0x18]
add eax, 2
mov word [edi + 0xe], cx
mov word [edi + 0xc], ax
movq xmm0, qword [0x10370334]
movq qword [edi + 0x10], xmm0
mov ax, word [0x1037033c]
mov word [edi + 0x18], ax
mov eax, dword [esp + 0x14]
movzx eax, ax
push 0
mov dword [esp + 0x18], eax
inc eax
push esi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
test eax, eax
je 0x100cafe8
mov eax, dword [esp + 0x14]
lea ecx, [eax*2 + 0x1a]
sub ecx, esi
add ecx, edi
movzx eax, word [esi]
lea esi, [esi + 2]
mov word [ecx + esi - 2], ax
test ax, ax
jne 0x100caf85
mov esi, dword [esp + 0x20]
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x100cafe8
push 0
push 0x2200000
push 3
push 0
push 0
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 0x1c], eax
cmp eax, 0xffffffff
je 0x100cafe8
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x10]
push 0
push ecx
push 0
push 0
movzx ecx, dx
push ecx
push edi
push 0x900a4
push eax
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [esp + 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x14], eax
call esi
push dword [esp + 0x1c]
call esi
push edi
push dword [0x103cc53c]
call dword [0x103cc54c]
mov eax, dword [esp + 0x18]
add esp, 8
test eax, eax
je 0x100cb037
push eax
call sym.python310.dll_PyErr_SetFromWindowsErr
add esp, 4
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.1024a596
mov esp, ebp
pop ebp
ret
inc dword [sym.python310.dll__Py_NoneStruct]
mov eax, sym.python310.dll__Py_NoneStruct
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.1024a596
mov esp, ebp
pop ebp
ret
push 0
push 0
push 0x57
push dword [sym.python310.dll_PyExc_OSError]
call sym.python310.dll_PyErr_SetExcFromWindowsErrWithFilenameObjects
mov ecx, dword [esp + 0x44]
add esp, 0x10
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.1024a596
mov esp, ebp
pop ebp
ret