Function at 0x40f070
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x587df8
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push esi
push edi
mov eax, dword [0x5ef60c]
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 0x40f0bd
push 0x5de3a0
lea ecx, [ebp - 0x24]
push ecx
mov dword [ebp - 0x24], ebx
call fcn.0055ad30
push esi
call fcn.0040efd0
add esp, 4
cmp eax, ebx
je 0x40f0e1
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.00401ff0
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 0x40f27c
cmp eax, ecx
jg 0x40f27c
movzx eax, word [edi + eax*2]
cmp ax, 0x5c
je 0x40f129
push 0x5b93a4
lea ecx, [ebp - 0x1c]
call fcn.00403fe0
mov edi, dword [ebp - 0x1c]
call fcn.0045e972
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x40f143
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 0x5b93a4
lea ecx, [ebp - 0x18]
push ecx
lea edx, [ebp - 0x28]
push edx
call fcn.0040afd0
xor ecx, ecx
add esp, 0xc
test edi, edi
setne cl
test ecx, ecx
jne 0x40f18a
push 0x80004005
call fcn.00401fd0
mov eax, dword [eax]
mov ecx, edi
mov edi, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40f1b6
test dx, dx
je 0x40f1b2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40f1b6
add eax, 4
add ecx, 4
test dx, dx
jne 0x40f190
xor eax, eax
jmp 0x40f1bb
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 0x40f1df
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
je 0x40f2a2
mov eax, dword [ebp - 0x14]
add eax, 1
mov ecx, dword [edi - 0xc]
js 0x40f211
cmp eax, ecx
jge 0x40f211
lea ecx, [edi + eax*2]
push 0x5c
push ecx
call fcn.00559b72
add esp, 8
test eax, eax
je 0x40f211
sub eax, edi
sar eax, 1
mov dword [ebp - 0x14], eax
jmp 0x40f218
mov dword [ebp - 0x14], 0xffffffff
mov edx, dword [ebp - 0x14]
push edx
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x1c]
call fcn.0040bfe0
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 0x40f258
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.0040efd0
mov esi, dword [ebp - 0x18]
add esp, 4
test eax, eax
jne 0x40f160
mov eax, dword [esi - 0xc]
cmp eax, 2
jne 0x40f291
cmp eax, 1
jge 0x40f286
push 0x80070057
call fcn.00401fd0
cmp word [esi + 2], 0x3a
je 0x40f160
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov dword [ebp - 0x20], eax
jmp 0x40f160
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 0x40f2c2
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 0x40f2e2
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