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.10149ac2
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.10149ac2
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.10149ac2
lea ecx, [ebp - 0x2bc]
mov byte [ebp - 4], 3
call fcn.10149ac2
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.10149ac2
push ebx
lea edx, [ebp - 0x2a0]
mov byte [ebp - 4], 4
mov ecx, edi
call fcn.10149ac2
push ebx
xor ebx, ebx
mov byte [ebp - 4], 2
inc ebx
lea ecx, [ebp - 0x2a0]
push ebx
call fcn.10149ac2
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.10149ac2
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.10149ac2
push ebx
lea eax, [ebp - 0x2d8]
mov byte [ebp - 4], 6
push eax
lea edx, [ebp - 0x2a0]
mov ecx, edi
call fcn.10149ac2
push esi
push ebx
lea ecx, [ebp - 0x2a0]
call fcn.10149ac2
push esi
push ebx
lea ecx, [ebp - 0x2d8]
mov byte [ebp - 4], 2
call fcn.10149ac2
push esi
or edx, 0xffffffff
mov ecx, edi
call fcn.100404d1
lea ecx, [ebp - 0x2fc]
mov byte [ebp - 0x2fc], bl
call fcn.10149ac2
call fcn.10167384
ret
push esi
push dword [ecx + 0x3c]
mov edx, 0x1001932c
push dword [ecx + 0x38]
push 0x20
pop ecx
call fcn.10149ac2
push esi
lea ecx, [ebp - 0x310]
call fcn.10149ac2
push 0x10196090
mov eax, ecx
push eax
call sub.msvcrt.dll__CxxThrowException
call fcn.10149ac2
int3