Function at 0x40be20
Capabilities:
Create directory

Disassembly:
push 0xffffffffffffffff
push 0x43e998
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push ebp
push esi
push edi
mov eax, dword [0x451d80]
xor eax, esp
push eax
lea eax, [esp + 0x20]
mov dword fs:[0], eax
mov ebx, ecx
push 0
push ebx
call fcn.00427c70
add esp, 8
test eax, eax
je 0x40c011
lea esi, [esp + 0x18]
call fcn.00406b80
lea eax, [esp + 0x1c]
push eax
mov ecx, esi
push ecx
mov ecx, 1
mov dword [esp + 0x30], 0
call fcn.0040b5a0
mov eax, dword [eax]
mov ecx, 0x4474e8
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40beac
test dx, dx
je 0x40bea8
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40beac
add eax, 4
add ecx, 4
test dx, dx
jne 0x40be86
xor eax, eax
jmp 0x40beb1
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
mov eax, dword [esp + 0x1c]
lea edx, [eax - 0xc]
setne bl
cmp edx, 0x45352c
je 0x40bee3
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40bee3
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff4
push eax
call fcn.00419273
add esp, 4
test bl, bl
je 0x40bf02
push 0x4474e8
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
mov eax, 0x4474e8
lea edi, [esp + 0x18]
call fcn.0040b680
mov edi, dword [esp + 0x18]
cmp dword [edi - 8], 0
jl 0x40bf24
push 0x4474ec
push edi
call fcn.00427b8b
add esp, 8
test eax, eax
je 0x40bf24
sub eax, edi
sar eax, 1
jmp 0x40bf27
or eax, 0xffffffff
add eax, 2
js 0x40bfef
cmp eax, dword [edi - 8]
jg 0x40bfef
lea ecx, [edi + eax*2]
push 0x4474e8
push ecx
call fcn.00427b8b
add esp, 8
test eax, eax
je 0x40bfef
sub eax, edi
sar eax, 1
mov esi, eax
test esi, esi
jle 0x40bfef
mov ebp, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea edx, [esp + 0x1c]
push edx
mov ecx, esi
lea ebx, [esp + 0x1c]
call fcn.0040b4f0
mov eax, dword [eax]
push 0
push eax
call ebp
test eax, eax
mov eax, dword [esp + 0x1c]
lea ecx, [eax - 0xc]
sete bl
cmp ecx, 0x45352c
je 0x40bfaf
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40bfaf
mov edx, dword [esp + 0x1c]
add edx, 0xfffffff4
push edx
call fcn.00419273
add esp, 4
test bl, bl
je 0x40bfc0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x40c02a
lea eax, [esi + 1]
test eax, eax
jl 0x40bfef
cmp eax, dword [edi - 8]
jg 0x40bfef
lea eax, [edi + eax*2]
push 0x4474e8
push eax
call fcn.00427b8b
add esp, 8
test eax, eax
je 0x40bfef
sub eax, edi
sar eax, 1
mov esi, eax
test esi, esi
jg 0x40bf66
lea ecx, [edi - 0xc]
cmp ecx, 0x45352c
je 0x40c011
lea esi, [edi - 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40c011
push esi
call fcn.00419273
add esp, 4
mov eax, 1
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
lea ecx, [esp + 0x1c]
push ecx
mov ecx, esi
lea ebx, [esp + 0x1c]
call fcn.0040b4f0
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [esi]
push eax
push edx
push str.CreateDirectory__s__failed__errno_d
mov ebx, 4
call fcn.004156d0
mov eax, dword [esp + 0x28]
lea ecx, [eax - 0xc]
add esp, 0xc
cmp ecx, 0x45352c
je 0x40c085
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40c085
mov edx, dword [esp + 0x1c]
add edx, 0xfffffff4
push edx
call fcn.00419273
add esp, 4
lea eax, [edi - 0xc]
cmp eax, 0x45352c
je 0x40c0a6
lea esi, [edi - 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40c0a6
push esi
call fcn.00419273
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret