Function at 0x10040684
Capabilities:
Create directory

Disassembly:
push 0x304
mov eax, 0x10167ef1
call fcn.101673d5
mov edi, ecx
push 0x208
xor ebx, ebx
lea eax, [ebp - 0x284]
push ebx
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x284]
mov edx, 0x104
call fcn.101157b7
mov esi, eax
test esi, esi
jns 0x100406e3
mov ecx, dword [0x101973c0]
cmp ecx, 0x101973c0
je 0x100409ff
test byte [ecx + 0x44], 1
jne 0x100409eb
jmp 0x100409ff
push ebx
lea eax, [ebp - 0x284]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x10040743
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 0xb7
je 0x10040743
test esi, esi
jle 0x10040714
movzx esi, si
or esi, 0x80070000
test esi, esi
jns 0x10040743
mov eax, dword [0x101973c0]
cmp eax, 0x101973c0
je 0x100409ff
test byte [eax + 0x44], 1
je 0x100409ff
push esi
push dword [eax + 0x3c]
mov edx, 0x1001932c
push dword [eax + 0x38]
push 0x21
jmp 0x100409f9
lea eax, [ebp - 0x30c]
push eax
call dword [sym.imp.ole32.dll_CoCreateGuid]
mov esi, eax
test esi, esi
jns 0x10040785
mov ecx, dword [0x101973c0]
cmp ecx, 0x101973c0
je 0x100409ff
test byte [ecx + 0x44], 1
je 0x100409ff
push esi
push dword [ecx + 0x3c]
mov edx, 0x1001932c
push dword [ecx + 0x38]
push 0x22
jmp 0x100409f9
push 0x32
lea eax, [ebp - 0x7c]
push eax
lea eax, [ebp - 0x30c]
push eax
call dword [sym.imp.ole32.dll_StringFromGUID2]
test eax, eax
jne 0x100407ce
mov eax, dword [0x101973c0]
mov esi, 0x8007000e
cmp eax, 0x101973c0
je 0x100409ff
test byte [eax + 0x44], 1
je 0x100409ff
push esi
push dword [eax + 0x3c]
mov edx, 0x1001932c
push dword [eax + 0x38]
push 0x23
jmp 0x100409f9
lea ecx, [ebp - 0x7c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x100407d4
sub ecx, edx
sar ecx, 1
lea ecx, [ecx*2 - 2]
cmp ecx, 0x64
jae 0x10040a18
xor eax, eax
mov edx, 0x104
mov word [ebp + ecx - 0x7c], ax
lea eax, [ebp - 0x7a]
push eax
lea ecx, [ebp - 0x284]
call fcn.1003f209
mov esi, eax
test esi, esi
jns 0x10040843
mov ecx, dword [0x101973c0]
cmp ecx, 0x101973c0
je 0x100409ff
test byte [ecx + 0x44], 1
je 0x100409ff
push esi
push dword [ecx + 0x3c]
mov edx, 0x1001932c
push dword [ecx + 0x38]
push 0x24
jmp 0x100409f9
push ebx
lea eax, [ebp - 0x284]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x10040897
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x1004086a
movzx esi, si
or esi, 0x80070000
mov eax, dword [0x101973c0]
cmp eax, 0x101973c0
je 0x100409ff
test byte [eax + 0x44], 1
je 0x100409ff
push esi
push dword [eax + 0x3c]
mov edx, 0x1001932c
push dword [eax + 0x38]
push 0x25
jmp 0x100409f9
lea eax, [ebp - 0x284]
mov dword [ebp - 0x2bc], 0x100011c8
mov dword [ebp - 0x2b8], eax
lea eax, [ebp - 0x2bc]
mov dword [ebp - 0x2ac], eax
mov dword [ebp - 4], ebx
lea ecx, [ebp - 0x2f4]
push eax
mov byte [ebp - 0x2fc], bl
mov dword [ebp - 0x2e4], ebx
call fcn.1004431f
lea ecx, [ebp - 0x2bc]
mov byte [ebp - 4], 3
call fcn.100442d4
xor edx, edx
mov byte [ebp - 4], 2
mov ecx, edi
call fcn.10040480
push 7
pop esi
push 0xe
xor eax, eax
mov dword [ebp - 0x28c], esi
push 0x10018d5c
lea ecx, [ebp - 0x2a0]
mov dword [ebp - 0x290], ebx
mov word [ebp - 0x2a0], ax
call fcn.100451ec
push ebx
lea edx, [ebp - 0x2a0]
mov byte [ebp - 4], 4
mov ecx, edi
call fcn.1005d6fe
push ebx
xor ebx, ebx
mov byte [ebp - 4], 2
inc ebx
lea ecx, [ebp - 0x2a0]
push ebx
call fcn.10045637
and dword [ebp - 0x2c8], 0
lea ecx, [ebp - 0x2d8]
xor eax, eax
mov dword [ebp - 0x2c4], esi
mov word [ebp - 0x2d8], ax
lea eax, [ebp - 0x7a]
push eax
call fcn.10045266
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x2a0]
mov dword [ebp - 0x28c], esi
xor eax, eax
push 0xe
xor esi, esi
mov word [ebp - 0x2a0], ax
push 0x10018d7c
mov dword [ebp - 0x290], esi
call fcn.100451ec
push ebx
lea eax, [ebp - 0x2d8]
mov byte [ebp - 4], 6
push eax
lea edx, [ebp - 0x2a0]
mov ecx, edi
call fcn.1005d507
push esi
push ebx
lea ecx, [ebp - 0x2a0]
call fcn.10045637
push esi
push ebx
lea ecx, [ebp - 0x2d8]
mov byte [ebp - 4], 2
call fcn.10045637
push esi
or edx, 0xffffffff
mov ecx, edi
call fcn.100404d1
lea ecx, [ebp - 0x2fc]
mov byte [ebp - 0x2fc], bl
call fcn.1004002e
call fcn.10167384
ret
push esi
push dword [ecx + 0x3c]
mov edx, 0x1001932c
push dword [ecx + 0x38]
push 0x20
pop ecx
call fcn.1003f754
push esi
lea ecx, [ebp - 0x310]
call fcn.1003ecfb
push 0x10196090
mov eax, ecx
push eax
call sub.msvcrt.dll__CxxThrowException
call fcn.1016706c
int3