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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov ebx, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
test byte [0x651531d8], 8
jne 0x65149d48
test ebx, ebx
je 0x65149baa
cmp word [ebx], 0
jne 0x65149db0
mov eax, edi
call sym._validate_envW
xor ecx, ecx
mov edi, eax
test eax, eax
je 0x65149d35
mov edx, dword [sym.imp.kernel32.dll_GetSystemDirectoryW]
mov dword [ebp - 0x20], ecx
mov dword [esp + 4], 0
mov dword [ebp - 0x1c], edx
mov dword [esp], 0
call edx
mov esi, dword [sym.imp.ucrtbase.dll_wcslen]
sub esp, 8
mov ebx, eax
mov dword [esp], str._spool
call esi
mov dword [esp], str.drivers_
add ebx, eax
call esi
add ebx, eax
mov eax, dword [edi + 4]
mov dword [esp], eax
call esi
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x20]
add ebx, eax
mov eax, dword [ebp + 0x1c]
add ebx, ebx
cmp dword [ebp + 0x18], ebx
mov dword [eax], ebx
jb 0x65149e50
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x65149e70
mov eax, dword [ebp + 0x18]
shr eax, 1
mov dword [esp + 4], eax
mov eax, dword [ebp + 0x14]
mov dword [esp], eax
call edx
mov eax, dword [ebp + 0x14]
sub esp, 8
cmp word [eax], 0
je 0x65149ea0
mov edx, eax
lea esi, [esi]
add edx, 2
cmp word [edx], 0
jne 0x65149c50
xor eax, eax
nop
lea esi, [esi]
movzx ecx, word [eax + str._spool]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x65149c60
mov eax, dword [ebp + 0x14]
mov dword [esp + 4], 0
mov ebx, dword [sym.imp.kernel32.dll_CreateDirectoryW]
mov dword [esp], eax
call ebx
mov eax, dword [ebp + 0x14]
sub esp, 8
cmp word [eax], 0
je 0x65149eb0
mov edx, eax
nop
lea esi, [esi]
add edx, 2
cmp word [edx], 0
jne 0x65149ca0
xor eax, eax
nop
lea esi, [esi]
movzx ecx, word [eax + str.drivers_]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x65149cb0
mov eax, dword [ebp + 0x14]
mov dword [esp + 4], 0
mov dword [esp], eax
call ebx
mov eax, dword [ebp + 0x14]
mov edi, dword [edi + 4]
sub esp, 8
cmp word [eax], 0
je 0x65149e90
mov edx, eax
nop
lea esi, [esi]
add edx, 2
cmp word [edx], 0
jne 0x65149cf0
xor eax, eax
nop
lea esi, [esi]
movzx ecx, word [edi + eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x65149d00
mov eax, dword [ebp + 0x14]
mov dword [esp + 4], 0
mov dword [esp], eax
call ebx
mov ecx, 1
sub esp, 8
test byte [0x651531d8], 8
jne 0x65149e10
lea esp, [ebp - 0xc]
mov eax, ecx
pop ebx
pop esi
pop edi
pop ebp
ret 0x18
mov edx, 0xffffffff
mov eax, edi
call sym._wine_dbgstr_wn
mov edx, 0xffffffff
mov esi, eax
mov eax, ebx
call sym._wine_dbgstr_wn
mov ecx, dword [ebp + 0x1c]
mov edx, dword [ebp + 0x10]
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], eax
mov dword [esp + 0x24], ecx
mov ecx, dword [ebp + 0x18]
mov dword [esp + 0x18], edx
mov dword [esp + 0x20], ecx
mov ecx, dword [ebp + 0x14]
mov dword [esp + 0xc], str.__s___s___ld___p___ld___p__n
mov dword [esp + 0x1c], ecx
mov dword [esp + 8], str.fpGetPrinterDriverDirectory
mov dword [esp + 4], 0x651531d8
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
jmp 0x65149b9c
test byte [0x651531d8], 1
jne 0x65149dd8
mov eax, dword fs:[0x18]
xor ecx, ecx
mov dword [eax + 0x34], 0x57
lea esp, [ebp - 0xc]
pop ebx
mov eax, ecx
pop esi
pop edi
pop ebp
ret 0x18
mov edx, 0xffffffff
mov eax, ebx
call sym._wine_dbgstr_wn
mov dword [esp + 0xc], str.server__s_not_supported_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.fpGetPrinterDriverDirectory
mov dword [esp + 4], 0x651531d8
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0_1
jmp 0x65149db9
mov eax, dword [ebp + 0x14]
mov edx, 0xffffffff
mov dword [ebp - 0x1c], ecx
call sym._wine_dbgstr_wn
mov dword [esp + 0xc], str.___s_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.fpGetPrinterDriverDirectory
mov dword [esp + 4], 0x651531d8
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
mov ecx, dword [ebp - 0x1c]
jmp 0x65149d35
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 0x7a
lea esp, [ebp - 0xc]
mov eax, ecx
pop ebx
pop esi
pop edi
pop ebp
ret 0x18
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 0x6f8
lea esp, [ebp - 0xc]
mov eax, ecx
pop ebx
pop esi
pop edi
pop ebp
ret 0x18
mov edx, dword [ebp + 0x14]
jmp 0x65149cf9
mov edx, dword [ebp + 0x14]
jmp 0x65149c59
mov edx, dword [ebp + 0x14]
jmp 0x65149ca9