Function at 0x401c30
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x412058
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push edi
mov eax, dword [0x418054]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [esi]
mov eax, dword [eax - 0xc]
test eax, eax
je 0x401e47
mov edi, dword [ebp + 8]
mov ecx, dword [edi]
cmp dword [ecx - 0xc], 0
je 0x401e47
lea eax, [ebp - 0x18]
mov ecx, esi
mov dword [ebp - 0x10], 0x5c
call fcn.00403200
mov eax, dword [eax]
lea ecx, [ebp - 0x10]
lea esp, [esp]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x401cb6
test dx, dx
je 0x401cb2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x401cb6
add eax, 4
add ecx, 4
test dx, dx
jne 0x401c90
xor eax, eax
jmp 0x401cbb
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x18]
setne bl
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x401ce6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
je 0x401d0b
lea eax, [ebp - 0x10]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x401cf0
sub eax, edx
sar eax, 1
push eax
lea ecx, [ebp - 0x10]
push ecx
mov ebx, esi
call fcn.00403530
lea edx, [ebp - 0x10]
push edx
lea eax, [ebp - 0x14]
push eax
push edi
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0
call fcn.004030d0
mov dword [ebp - 4], 1
mov ecx, dword [ebp - 0x14]
mov eax, dword [ecx - 0xc]
test eax, eax
je 0x401e11
jmp 0x401d43
mov edi, dword [ebp + 8]
push eax
push ecx
mov ebx, esi
call fcn.00403530
lea eax, [ebp - 0x10]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x401d52
sub eax, edx
sar eax, 1
push eax
lea ecx, [ebp - 0x10]
push ecx
mov ebx, esi
call fcn.00403530
mov eax, dword [esi]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea edx, [ebp - 0x10]
push edx
lea eax, [ebp - 0x20]
push eax
push edi
lea eax, [ebp - 0x18]
call fcn.004030d0
mov byte [ebp - 4], 2
mov ecx, dword [eax]
mov edi, dword [ebp - 0x14]
lea eax, [ecx - 0x10]
add edi, 0xfffffff0
cmp eax, edi
je 0x401de0
cmp dword [edi + 0xc], 0
lea ebx, [edi + 0xc]
jl 0x401dd4
mov edx, dword [eax]
cmp edx, dword [edi]
jne 0x401dd4
call fcn.004037f0
mov dword [ebp - 0x1c], eax
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x401dc9
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
mov ecx, dword [ebp - 0x1c]
add ecx, 0x10
mov dword [ebp - 0x14], ecx
jmp 0x401de0
mov edi, dword [ecx - 0xc]
push ecx
lea ebx, [ebp - 0x14]
call fcn.004035f0
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x401e03
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x14]
mov eax, dword [ecx - 0xc]
test eax, eax
jne 0x401d40
lea eax, [ecx - 0x10]
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401e34
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 0x80070057
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
mov esp, ebp
pop ebp
ret