Function at 0x405650
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x534bc8
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x586e90]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 0
call fcn.0040f6aa
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x405699
push 0x80004005
call fcn.004038b0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea edi, [eax + 0x10]
mov dword [ebp - 0x10], edi
mov byte [ebp - 4], 1
mov ecx, dword [ebp + 8]
mov eax, dword [ecx - 0xc]
test eax, eax
jns 0x4056bb
or eax, 0xffffffff
jmp 0x4056d9
push 0x561ea4
push ecx
call fcn.005106f3
mov ecx, dword [ebp + 8]
add esp, 8
test eax, eax
jne 0x4056d5
or eax, 0xffffffff
jmp 0x4056d9
sub eax, ecx
sar eax, 1
inc eax
mov edx, dword [ecx - 0xc]
js 0x405855
cmp eax, edx
jg 0x405855
lea ecx, [ecx + eax*2]
push 0x561ea4
push ecx
call fcn.005106f3
add esp, 8
test eax, eax
je 0x405855
sub eax, dword [ebp + 8]
sar eax, 1
test eax, eax
jle 0x405855
inc eax
push eax
lea edx, [ebp - 0x14]
push edx
lea ecx, [ebp + 8]
mov dword [ebp - 0x18], eax
call fcn.00407be0
mov byte [ebp - 4], 2
mov eax, dword [eax]
lea esi, [eax - 0x10]
lea ebx, [edi - 0x10]
cmp esi, ebx
je 0x4057d3
cmp dword [ebx + 0xc], 0
jl 0x4057c3
mov ecx, dword [esi]
cmp ecx, dword [ebx]
jne 0x4057c3
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
call edx
cmp dword [esi + 0xc], 0
lea ecx, [esi + 0xc]
jl 0x405767
cmp eax, dword [esi]
jne 0x405767
mov edi, esi
mov eax, 1
lock xadd dword [ecx], eax
jmp 0x4057a2
mov ecx, dword [esi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
mov edi, eax
test edi, edi
je 0x4058b4
mov eax, dword [esi + 4]
mov dword [edi + 4], eax
mov eax, dword [esi + 4]
lea ecx, [eax + eax + 2]
push ecx
add esi, 0x10
lea edx, [eax + eax + 2]
push esi
push edx
lea eax, [edi + 0x10]
push eax
call fcn.0050f548
add esp, 0x10
lea eax, [ebx + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4057bb
mov ecx, dword [ebx]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push ebx
call eax
add edi, 0x10
mov dword [ebp - 0x10], edi
jmp 0x4057d3
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [ebp - 0x10]
call fcn.00403730
mov edi, dword [ebp - 0x10]
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4057f6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
cmp dword [edi - 4], 1
jle 0x405814
mov ecx, dword [edi - 0xc]
push ecx
lea ecx, [ebp - 0x10]
call fcn.00403580
mov edi, dword [ebp - 0x10]
push edi
push str.CreateFolder_________s
call fcn.00408e80
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp + 8]
mov edx, dword [eax - 0xc]
add esp, 8
test ecx, ecx
js 0x405855
cmp ecx, edx
jg 0x405855
lea edx, [eax + ecx*2]
push 0x561ea4
push edx
call fcn.005106f3
add esp, 8
test eax, eax
je 0x405855
sub eax, dword [ebp + 8]
sar eax, 1
test eax, eax
jg 0x405711
add edi, 0xfffffff0
mov byte [ebp - 4], 0
lea eax, [edi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x405875
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40589b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
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 4
call fcn.00403610
int3