Function at 0x407020
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x571558
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push esi
push edi
mov eax, dword [0x5d2614]
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 0x40706d
push 0x5c38d0
lea ecx, [ebp - 0x24]
push ecx
mov dword [ebp - 0x24], ebx
call fcn.00544c32
push esi
call fcn.00406f80
add esp, 4
cmp eax, ebx
je 0x407091
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.00402000
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 0x40722c
cmp eax, ecx
jg 0x40722c
movzx eax, word [edi + eax*2]
cmp ax, 0x5c
je 0x4070d9
push 0x5a12d4
lea ecx, [ebp - 0x1c]
call fcn.00403ff0
mov edi, dword [ebp - 0x1c]
call fcn.00448a4d
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x4070f3
push 0x80004005
call fcn.00401fd0
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 0x5a12d4
lea ecx, [ebp - 0x18]
push ecx
lea edx, [ebp - 0x28]
push edx
call fcn.0040b600
xor ecx, ecx
add esp, 0xc
test edi, edi
setne cl
test ecx, ecx
jne 0x40713a
push 0x80004005
call fcn.00401fd0
mov eax, dword [eax]
mov ecx, edi
mov edi, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x407166
test dx, dx
je 0x407162
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x407166
add eax, 4
add ecx, 4
test dx, dx
jne 0x407140
xor eax, eax
jmp 0x40716b
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 0x40718f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
je 0x407252
mov eax, dword [ebp - 0x14]
add eax, 1
mov ecx, dword [edi - 0xc]
js 0x4071c1
cmp eax, ecx
jge 0x4071c1
lea ecx, [edi + eax*2]
push 0x5c
push ecx
call fcn.005430e3
add esp, 8
test eax, eax
je 0x4071c1
sub eax, edi
sar eax, 1
mov dword [ebp - 0x14], eax
jmp 0x4071c8
mov dword [ebp - 0x14], 0xffffffff
mov edx, dword [ebp - 0x14]
push edx
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x1c]
call fcn.004063f0
push eax
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 3
call fcn.00401f40
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 0x407208
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.00406f80
mov esi, dword [ebp - 0x18]
add esp, 4
test eax, eax
jne 0x407110
mov eax, dword [esi - 0xc]
cmp eax, 2
jne 0x407241
cmp eax, 1
jge 0x407236
push 0x80070057
call fcn.00401fd0
cmp word [esi + 2], 0x3a
je 0x407110
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov dword [ebp - 0x20], eax
jmp 0x407110
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 0x407272
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 0x407292
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