Function at 0x4e0b90
Capabilities:
Create directory

Disassembly:
push ebp
push edi
mov edi, eax
push esi
push ebx
mov esi, edx
sub esp, 0x6c
mov dword [esp + 4], 0x5c
mov dword [esp], edx
call sub.msvcrt.dll_wcsrchr
test eax, eax
mov ebx, eax
je 0x4e0cf0
lea edx, [eax + 2]
movzx eax, word [eax + 2]
test ax, ax
je 0x4e0d0d
cmp ax, 0x2e
je 0x4e0d00
lea ebp, [esp + 0x2a]
lea eax, [edi + 0xfc]
lea ecx, [esp + 0x2c]
mov dword [esp + 4], 0
mov edx, esi
mov dword [esp], ebp
mov dword [esp + 0x18], eax
call fcn.004e0490
test eax, eax
jne 0x4e0d50
movzx eax, word [esp + 0x2a]
and ax, 0xf000
cmp ax, 0x4000
je 0x4e0ce0
test byte [edi + 0x124], 8
jne 0x4e0e90
mov dword [esp], esi
mov ebx, dword [sym.imp.msvcrt.dll__wunlink]
call ebx
test eax, eax
jne 0x4e0e30
mov dword [esp], esi
movzx ebx, word [edi + 0x68]
call fcn.004de7a0
test eax, eax
je 0x4e0da0
mov dword [esp + 4], 0
mov dword [esp], eax
mov dword [esp + 0x1c], eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
sub esp, 8
test eax, eax
mov edx, dword [esp + 0x1c]
je 0x4e0e10
not ebx
mov ebp, ebx
and bx, 0x1fd
and bp, 0x1ff
or bx, 0x1c0
cmp bp, bx
je 0x4e0cd1
mov dword [esp + 4], 0x68
mov dword [esp], 1
mov dword [esp + 0x18], edx
call sub.msvcrt.dll_calloc
test eax, eax
mov ebx, eax
je 0x4e0e01
mov eax, dword [edi + 0x6c]
mov dword [ebx + 0x5c], 0
mov dword [edi + 0x6c], ebx
mov dword [ebx], eax
mov dword [esp], esi
call dword [sym.imp.msvcrt.dll__wcsdup]
or dword [ebx + 0x5c], 0x20000000
mov edx, dword [esp + 0x18]
mov dword [ebx + 0x60], eax
mov dword [ebx + 0x58], 0
mov word [ebx + 0x20], bp
mov dword [esp], edx
call sub.msvcrt.dll_free
lea esi, [esi]
xor eax, eax
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret
movzx eax, word [esi]
test ax, ax
je 0x4e0ce0
mov edx, esi
jmp 0x4e0bc5
movzx eax, word [edx + 2]
test ax, ax
jne 0x4e0d30
test ebx, ebx
je 0x4e0ce0
xor ecx, ecx
mov edx, esi
mov eax, edi
mov word [ebx], cx
mov esi, 0x5c
call fcn.004e0b90
mov word [ebx], si
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret
cmp ax, 0x2e
jne 0x4e0bcf
cmp word [edx + 4], 0
jne 0x4e0bcf
jmp 0x4e0d09
mov eax, dword [sym.imp.msvcrt.dll__errno]
mov dword [esp + 0x1c], eax
call eax
cmp dword [eax], 2
je 0x4e0d6f
mov eax, dword [esp + 0x1c]
call eax
cmp dword [eax], 0x14
jne 0x4e0eb6
test ebx, ebx
je 0x4e0c2e
xor eax, eax
mov edx, esi
mov word [ebx], ax
mov eax, edi
call fcn.004e0b90
mov edx, 0x5c
test eax, eax
mov word [ebx], dx
je 0x4e0c2e
jmp 0x4e0ce2
mov dword [esp + 0x1c], eax
call dword [sym.imp.msvcrt.dll__errno]
mov edx, dword [esp + 0x1c]
mov dword [eax], 0x16
mov dword [esp], edx
call sub.msvcrt.dll_free
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x2c]
mov dword [esp + 4], 0
mov dword [esp], ebp
mov edx, esi
call fcn.004e0490
test eax, eax
jne 0x4e0ded
movzx eax, word [esp + 0x2a]
and ax, 0xf000
cmp ax, 0x4000
je 0x4e0ce0
call dword [sym.imp.msvcrt.dll__errno]
mov dword [esp + 0xc], esi
mov dword [esp + 8], str.Failed_to_create_dir__ls
jmp 0x4e0e4d
mov eax, dword [0x5c]
ud2
mov dword [esp + 0x1c], edx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], eax
call fcn.004df080
mov edx, dword [esp + 0x1c]
jmp 0x4e0db4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7b
je 0x4e0e65
call dword [sym.imp.msvcrt.dll__errno]
mov dword [esp + 0xc], esi
mov dword [esp + 8], str.Cant_create_directory__ls:_Conflicting_file_cannot_be_removed
mov eax, dword [eax]
mov dword [esp], edi
mov dword [esp + 4], eax
call fcn.004de480
mov eax, 0xffffffe7
jmp 0x4e0ce2
mov dword [esp], esi
call fcn.004de7a0
mov dword [esp], eax
mov dword [esp + 0x1c], eax
call ebx
mov edx, dword [esp + 0x1c]
mov ebx, eax
mov dword [esp], edx
call sub.msvcrt.dll_free
test ebx, ebx
je 0x4e0c2e
jmp 0x4e0e3b
mov dword [esp + 0xc], esi
mov dword [esp + 8], str.Cant_create_directory__ls
mov dword [esp + 4], 0x11
mov dword [esp], edi
call fcn.004de480
mov eax, 0xffffffe7
jmp 0x4e0ce2
mov eax, dword [esp + 0x1c]
call eax
mov dword [esp + 0xc], esi
mov dword [esp + 8], str.Cant_test_directory__ls
jmp 0x4e0e4d