Function at 0x409650
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0xd4
mov dword [ebp - 0xe0], edx
mov edi, dword [ebp + 0xc]
mov esi, ecx
lea ecx, [ebp - 0xdc]
mov eax, dword [0x43300c]
mov edx, esi
xor eax, ebp
mov dword [ebp - 0x10], eax
xor eax, eax
test edi, edi
mov dword [ebp - 0xdc], 2
mov dword [ebp - 0xd8], 0xffffffff
mov dword [ebp - 0xd4], 0xffffffff
mov dword [ebp - 0xd0], 0
mov dword [ebp - 0xcc], 0
sete al
push eax
call fcn.0040ade0
add esp, 4
mov eax, dword [ebp - 0xd8]
cmp eax, 0xffffffff
je 0x4096ee
mov ecx, eax
and ecx, 0x10
je 0x4096ee
test eax, 0x400
jne 0x4096ee
mov eax, dword [ebp - 0xdc]
cmp eax, 1
je 0x4096ee
test edi, edi
jne 0x4096ee
xor ebx, ebx
cmp eax, 2
jne 0x409aca
lea eax, [ebp - 0x24]
lea ebx, [ebp - 0xb0]
mov dword [ebp - 0xa8], 0
mov dword [ebp - 0xa4], 0
mov dword [ebp - 0xa0], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0xb0], 0
mov word [ebp - 0xac], 0x500
mov dword [ebp - 0x98], 0
mov dword [ebp - 0x9c], 0
mov dword [ebp - 0x90], 0
mov dword [ebp - 0x94], 0
mov dword [ebp - 0x88], 0
mov dword [ebp - 0x8c], 0
mov dword [ebp - 0x80], 0
mov dword [ebp - 0x84], 0
mov dword [ebp - 0x78], 0
mov dword [ebp - 0x7c], 0
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x74], 0
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x6c], 0
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x24], 0
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0x221
push 0x20
push 2
push ebx
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
mov edi, eax
mov eax, dword [ebp - 0xa8]
mov ecx, dword [ebp - 0x24]
test eax, eax
mov dword [ebp - 0xa8], ecx
je 0x409833
push eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
test edi, edi
je 0x409a2f
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x9c], 0x1f01ff
mov dword [ebp - 0x98], 2
mov dword [ebp - 0x94], 3
mov dword [ebp - 0x88], 0
mov dword [ebp - 0x84], 2
mov dword [ebp - 0xbc], 0
mov dword [ebp - 0x80], eax
lea eax, [ebp - 0xbc]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0x220
push 0x20
push 2
push ebx
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
mov edi, eax
mov eax, dword [ebp - 0xa4]
mov ecx, dword [ebp - 0xbc]
test eax, eax
mov dword [ebp - 0xa4], ecx
je 0x4098bf
push eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
test edi, edi
je 0x4099c6
mov eax, dword [ebp - 0xbc]
mov dword [ebp - 0x7c], 0x1f01ff
mov dword [ebp - 0x78], 2
mov dword [ebp - 0x74], 3
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x64], 2
mov dword [ebp - 0xc4], 0
mov dword [ebp - 0x60], eax
lea eax, [ebp - 0xc4]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0x12
push 1
push ebx
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
mov edi, eax
mov eax, dword [ebp - 0xa0]
mov ecx, dword [ebp - 0xc4]
test eax, eax
mov dword [ebp - 0xa0], ecx
je 0x40993c
push eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
test edi, edi
je 0x4099c6
mov ecx, dword [ebp - 0xc4]
mov dword [ebp - 0x5c], 0x1f01ff
mov dword [ebp - 0x58], 2
mov dword [ebp - 0x54], 3
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 1
lea eax, [ebp - 0x9c]
mov dword [ebp - 0xb4], 0
mov dword [ebp - 0x40], ecx
lea ecx, [ebp - 0xb4]
push ecx
push 0
push eax
push 3
call dword [sym.imp.ADVAPI32.dll_SetEntriesInAclW]
mov edi, eax
mov eax, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0xb4]
test eax, eax
mov dword [ebp - 0x3c], ecx
je 0x4099ab
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
test edi, edi
je 0x409b13
movzx ebx, di
or ebx, 0x80070000
test edi, edi
cmovle ebx, edi
jmp 0x409a46
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [ebp + 0xc]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x409a4d
test edi, edi
jne 0x409bc6
lea edx, [ebp - 0xdc]
mov ecx, esi
push 0
call fcn.0040a000
add esp, 4
lea eax, [ebp - 0x30]
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
xor ebx, ebx
test eax, eax
jne 0x409a4d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x409c67
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
jmp 0x409a4d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test eax, eax
jle 0x409a46
movzx ebx, bx
or ebx, 0x80070000
jmp 0x409a4d
mov edi, dword [ebp + 0xc]
test ebx, ebx
jns 0x4099e1
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x38], 0
test eax, eax
je 0x409a64
push eax
call fcn.0040da4a
add esp, 4
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x3c], 0
test eax, eax
je 0x409a79
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0xa0]
mov dword [ebp - 0xa0], 0
test eax, eax
je 0x409a94
push eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov eax, dword [ebp - 0xa4]
mov dword [ebp - 0xa4], 0
test eax, eax
je 0x409aaf
push eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov eax, dword [ebp - 0xa8]
mov dword [ebp - 0xa8], 0
test eax, eax
je 0x409aca
push eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov eax, dword [ebp - 0xcc]
mov dword [ebp - 0xcc], 0
test eax, eax
je 0x409ae7
push eax
call fcn.0040da4a
add esp, 4
mov eax, dword [ebp - 0xd4]
lea ecx, [eax + 1]
cmp ecx, 2
jb 0x409afc
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040e271
mov eax, ebx
add esp, 0xd4
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x14
call fcn.0040da41
add esp, 4
mov ecx, dword [ebp - 0x38]
mov dword [eax + 4], 0
mov dword [eax], 0
mov dword [eax + 0xc], 0
mov dword [eax + 8], 0
mov dword [eax + 0x10], 0
mov dword [ebp - 0x38], eax
test ecx, ecx
je 0x409b6e
push ecx
call fcn.0040da4a
add esp, 4
mov eax, dword [ebp - 0x38]
mov edi, dword [ebp + 0xc]
test eax, eax
jne 0x409b71
mov ebx, 0x8007000e
test ebx, ebx
jns 0x4099e1
jmp 0x409a4d
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x34], eax
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x409bbb
push 0
push dword [ebp - 0xb4]
push 1
push dword [ebp - 0x34]
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x409bbb
mov dword [ebp - 0x30], 0xc
xor ebx, ebx
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], 0
test ebx, ebx
jns 0x4099e1
jmp 0x409a4d
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x4099cf
lea ecx, [ebp - 0xbc]
mov edx, esi
mov dword [ebp - 0xbc], 0
mov dword [ebp - 0xb8], 0
call fcn.0040a270
mov ebx, eax
test eax, eax
js 0x409c41
cmp dword [ebp - 0xbc], 0
je 0x409c41
cmp byte [ebp + 8], 0
jne 0x409cf1
lea ecx, [ebp - 0xbc]
lea edx, [ebp - 0xdc]
push edi
lea eax, [ebp - 0xb0]
push eax
push dword [ebp - 0xe0]
call fcn.0040a370
add esp, 0xc
mov edi, eax
lea eax, [ebp - 0x30]
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
xor ebx, ebx
test eax, eax
jne 0x409c41
test edi, edi
jns 0x409de9
mov ebx, edi
mov eax, dword [ebp - 0xb8]
mov dword [ebp - 0xb8], 0
test eax, eax
je 0x409a4d
push eax
call fcn.0040da4a
add esp, 4
jmp 0x409a4d
mov dword [ebp - 0x24], 2
mov dword [ebp - 0x20], 0xffffffff
mov dword [ebp - 0x1c], 0xffffffff
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
lea ecx, [ebp - 0x24]
mov edx, esi
push 1
call fcn.0040ade0
add esp, 4
mov eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x409cba
mov ecx, eax
and ecx, 0x10
je 0x409cba
test eax, 0x400
jne 0x409cba
mov eax, dword [ebp - 0x24]
xor ebx, ebx
dec eax
cmp eax, 1
ja 0x409cbf
mov ebx, 0x800700b7
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x14], 0
test eax, eax
je 0x409cd6
push eax
call fcn.0040da4a
add esp, 4
mov eax, dword [ebp - 0x1c]
lea ecx, [eax + 1]
cmp ecx, 2
jb 0x409a4d
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x409a4d
movsd xmm0, qword [0x42b428]
movsd xmm1, qword [str.updates]
mov ebx, dword [ebp - 0xe0]
mov dword [ebp - 0xc4], 0
mov dword [ebp - 0xc0], 0
mov dword [ebp - 0xb4], 0x30
movsd qword [ebp - 0x1c], xmm0
movsd qword [ebp - 0x24], xmm1
mov eax, dword [ebx]
mov dword [ebp - 0xc8], eax
lea eax, [ebp - 0x24]
push eax
call fcn.00416b42
add esp, 4
mov edi, eax
lea eax, [ebp - 0xb4]
push eax
call fcn.00416b42
add esp, 4
add edi, dword [ebp - 0xc8]
lea ecx, [ebp - 0xc4]
lea edi, [eax + edi + 2]
lea eax, [ebp - 0xb4]
push eax
lea eax, [ebp - 0x24]
push eax
push dword [ebx + 4]
push str._s_s_s
push edi
push ecx
call fcn.00409560
add esp, 0x18
mov eax, dword [ebp - 0xc4]
lea ecx, [ebp - 0xbc]
lea edx, [ebp - 0xdc]
mov dword [ebp - 0xc8], eax
cmp eax, edi
lea eax, [ebp - 0xc4]
cmove ebx, eax
push dword [ebp + 0xc]
lea eax, [ebp - 0xb0]
push eax
push ebx
call fcn.0040a370
add esp, 0xc
mov ebx, eax
mov eax, dword [ebp - 0xc0]
mov dword [ebp - 0xc0], 0
test eax, eax
je 0x409dd6
push eax
call fcn.0040da4a
add esp, 4
cmp dword [ebp - 0xc8], edi
mov edi, 0x80004005
cmove edi, ebx
jmp 0x409c24
lea ecx, [ebp - 0xdc]
mov edx, esi
push 1
call fcn.0040ade0
add esp, 4
mov eax, dword [ebp - 0xd8]
mov ebx, 0x80004005
cmp eax, 0xffffffff
je 0x409c41
mov ecx, eax
and ecx, 0x10
je 0x409c41
test eax, 0x400
jne 0x409c41
mov eax, dword [ebp - 0xdc]
dec eax
cmp eax, 2
jb 0x409c41
lea eax, [ebp - 0xb0]
lea ecx, [ebp - 0xdc]
mov edx, esi
push eax
call fcn.0040af20
add esp, 4
cmp eax, 1
je 0x409c3f
jmp 0x409c41