Function at 0x418a50
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x45ed80
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x4786a0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x14], ecx
mov dword [ebp - 4], 0
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edx, dword [0x478034]
mov eax, dword [edx + 0xc]
mov ecx, 0x478034
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x10], esi
mov byte [ebp - 4], 1
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x418acd
add esi, 0xfffffff0
mov byte [ebp - 4], 0
lea edx, [esi + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jmp 0x418c8c
mov ecx, dword [ebp + 8]
push 0x5c
push ecx
call fcn.00446746
add esp, 8
test eax, eax
je 0x418c78
sub eax, dword [ebp + 8]
sar eax, 1
mov ebx, eax
cmp ebx, 0xffffffff
je 0x418c78
lea eax, [ebp + 8]
lea edi, [ebp - 0x10]
call fcn.0041db20
mov edx, dword [ebp + 8]
mov eax, dword [edx - 0xc]
mov ecx, edi
push ecx
sub eax, ebx
mov ecx, ebx
call fcn.0041dc90
mov esi, dword [ebp - 0x10]
push ecx
lea edi, [esi - 0x10]
mov eax, edi
mov dword [ebp - 0x18], esp
mov ebx, esp
call fcn.004218e0
add eax, 0x10
mov dword [ebx], eax
mov ebx, dword [ebp - 0x14]
mov ecx, ebx
call fcn.00418a50
test al, al
jne 0x418b8e
mov byte [ebp - 4], al
lea edx, [edi + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x418b52
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 0x418b78
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
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
mov ecx, dword [esi - 0xc]
lea eax, [ecx - 1]
test eax, eax
js 0x418cd4
cmp eax, ecx
jg 0x418cd4
cmp word [esi + eax*2], 0x5c
jne 0x418bd1
mov byte [ebp - 4], 0
lea ecx, [edi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x418c98
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
jmp 0x418c98
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x418bf4
lea eax, [ebp - 0x10]
call fcn.0041d790
lea eax, [ebp + 8]
call fcn.0041d790
jmp 0x418cbe
mov edx, dword [ebp + 8]
push 0
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x418c65
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 0x104], eax
lea edi, [ebx + 0x100]
test eax, eax
je 0x418c2e
push eax
mov eax, dword [ebp + 8]
push eax
push str.Failed_to_create_directory___s_._Error:__d.
call fcn.00422e30
add esp, 0xc
jmp 0x418c3f
mov ecx, dword [ebp + 8]
push ecx
push str.Failed_to_create_directory___s_.
call fcn.00422e30
add esp, 8
lea eax, [ebp - 0x10]
call fcn.0041d790
lea eax, [ebp + 8]
call fcn.0041d790
xor al, al
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
mov edx, dword [ebx + 0x124]
mov eax, dword [ebp + 8]
push edx
call fcn.00408c70
test al, al
je 0x418c3f
add esi, 0xfffffff0
mov byte [ebp - 4], 0
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x418c98
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
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 0x418cbe
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, 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
push 0x80070057
call fcn.00401680
int3