Function at 0x407010
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5706b8
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push esi
push edi
mov eax, dword [0x5d1614]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, ecx
xor ebx, ebx
mov dword [ebp - 4], ebx
mov eax, dword [esi]
cmp dword [eax - 0xc], ebx
mov dword [ebp - 0x20], ebx
jg 0x40705d
push 0x5c2820
lea ecx, [ebp - 0x24]
push ecx
mov dword [ebp - 0x24], ebx
call fcn.00543d86
push esi
call fcn.00406f70
add esp, 4
cmp eax, ebx
je 0x407081
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi]
sub eax, 0x10
push eax
call fcn.00401fe0
lea edi, [eax + 0x10]
add esp, 4
mov dword [ebp - 0x1c], edi
mov byte [ebp - 4], 1
mov ecx, dword [edi - 0xc]
lea eax, [ecx - 1]
cmp eax, ebx
jl 0x40721c
cmp eax, ecx
jg 0x40721c
movzx eax, word [edi + eax*2]
cmp ax, 0x5c
je 0x4070c9
push 0x5a02d4
lea ecx, [ebp - 0x1c]
call fcn.00403fd0
mov edi, dword [ebp - 0x1c]
call fcn.00447edb
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x4070e3
push 0x80004005
call fcn.00401fc0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x18], esi
mov byte [ebp - 4], 2
mov dword [ebp - 0x14], ebx
lea esp, [esp]
push 0x5a02d4
lea ecx, [ebp - 0x18]
push ecx
lea edx, [ebp - 0x28]
push edx
call fcn.0040b670
xor ecx, ecx
add esp, 0xc
test edi, edi
setne cl
test ecx, ecx
jne 0x40712a
push 0x80004005
call fcn.00401fc0
mov eax, dword [eax]
mov ecx, edi
mov edi, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x407156
test dx, dx
je 0x407152
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x407156
add eax, 4
add ecx, 4
test dx, dx
jne 0x407130
xor eax, eax
jmp 0x40715b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
mov eax, dword [ebp - 0x28]
setne bl
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40717f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
je 0x407242
mov eax, dword [ebp - 0x14]
add eax, 1
mov ecx, dword [edi - 0xc]
js 0x4071b1
cmp eax, ecx
jge 0x4071b1
lea ecx, [edi + eax*2]
push 0x5c
push ecx
call fcn.00542276
add esp, 8
test eax, eax
je 0x4071b1
sub eax, edi
sar eax, 1
mov dword [ebp - 0x14], eax
jmp 0x4071b8
mov dword [ebp - 0x14], 0xffffffff
mov edx, dword [ebp - 0x14]
push edx
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x1c]
call fcn.004063c0
push eax
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 3
call fcn.00401f10
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4071f8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x18]
push ecx
call fcn.00406f70
mov esi, dword [ebp - 0x18]
add esp, 4
test eax, eax
jne 0x407100
mov eax, dword [esi - 0xc]
cmp eax, 2
jne 0x407231
cmp eax, 1
jge 0x407226
push 0x80070057
call fcn.00401fc0
cmp word [esi + 2], 0x3a
je 0x407100
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov dword [ebp - 0x20], eax
jmp 0x407100
lea eax, [esi - 0x10]
mov byte [ebp - 4], 1
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x407262
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407282
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret