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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x50c330
push eax
mov dword fs:[0], esp
sub esp, 0x40
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
cmp dword [esi + 0x14], 8
jb 0x4c63bb
mov eax, dword [esi]
jmp 0x4c63bd
mov eax, esi
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push eax
call edi
cmp eax, 0xffffffff
je 0x4c645e
cmp dword [esi + 0x14], 8
jb 0x4c63d9
mov eax, dword [esi]
jmp 0x4c63db
mov eax, esi
push eax
call edi
test al, 0x10
je 0x4c6449
cmp dword [ebp + 0x10], 0
je 0x4c6433
push 0
sub esp, 0x18
mov ecx, esp
mov dword [ebp + 8], esp
push 0x51a7c0
call fcn.004158d0
sub esp, 0x18
mov dword [ebp - 4], 0
mov ecx, esp
xor eax, eax
push 0xffffffffffffffff
push eax
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
push esi
mov word [ecx], ax
call fcn.0040a2f0
mov dword [ebp - 4], 0xffffffff
call fcn.004c6f50
add esp, 0x34
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0x14], 8
jb 0x4c6453
mov eax, dword [esi]
jmp 0x4c6455
mov eax, esi
push eax
call fcn.004d6985
add esp, 4
xor eax, eax
mov dword [ebp - 0x20], 7
push 0xffffffffffffffff
push eax
push esi
lea ecx, [ebp - 0x34]
mov dword [ebp - 0x24], 0
mov ebx, 1
mov word [ebp - 0x34], ax
call fcn.0040a2f0
lea eax, [ebp - 0x34]
mov dword [ebp - 4], ebx
push eax
call fcn.00476460
xor ecx, ecx
xor esi, esi
add esp, 4
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x14], ecx
push ebx
push 0xffffffffffffffff
lea eax, [ebp + 8]
mov byte [ebp - 4], 2
push eax
lea ecx, [ebp - 0x34]
mov dword [ebp + 8], 0x2f
call fcn.00477770
mov edi, eax
cmp edi, 0xffffffff
je 0x4c65de
mov dword [ebp + 8], 0x2f
jmp 0x4c64d0
test edi, edi
je 0x4c65d9
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x34]
cmp edi, 2
jne 0x4c64f7
cmp ecx, 8
lea eax, [ebp - 0x34]
cmovae eax, edx
cmp word [eax + 2], 0x3a
je 0x4c65d9
cmp ecx, 8
lea eax, [ebp - 0x34]
cmovae eax, edx
cmp word [eax + edi*2 + 2], 0
je 0x4c65a3
push 0xffffffffffffffff
lea eax, [edi + 1]
push eax
lea eax, [ebp - 0x4c]
push eax
lea ecx, [ebp - 0x34]
call fcn.00477830
mov ebx, eax
mov byte [ebp - 4], 3
cmp ebx, esi
jae 0x4c6564
mov eax, dword [ebp - 0x1c]
cmp eax, ebx
ja 0x4c6564
sub ebx, eax
mov eax, 0x2aaaaaab
imul ebx
sar edx, 2
mov ebx, edx
shr ebx, 0x1f
add ebx, edx
cmp esi, dword [ebp - 0x14]
jne 0x4c6554
push 1
lea ecx, [ebp - 0x1c]
call fcn.00476cc0
mov esi, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
lea eax, [ebx + ebx*2]
lea eax, [ecx + eax*8]
test esi, esi
je 0x4c6582
push eax
jmp 0x4c657b
cmp esi, dword [ebp - 0x14]
jne 0x4c6576
push 1
lea ecx, [ebp - 0x1c]
call fcn.00476cc0
mov esi, dword [ebp - 0x18]
test esi, esi
je 0x4c6582
push ebx
mov ecx, esi
call fcn.00415860
add esi, 0x18
mov byte [ebp - 4], 2
cmp dword [ebp - 0x38], 8
mov dword [ebp - 0x18], esi
jb 0x4c659d
push dword [ebp - 0x4c]
call fcn.004cf489
add esp, 4
mov edx, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x20]
cmp dword [ebp - 0x24], edi
jb 0x4c66ca
cmp ecx, 8
mov dword [ebp - 0x24], edi
lea eax, [ebp - 0x34]
cmovae eax, edx
xor ecx, ecx
push 1
push 0xffffffffffffffff
mov word [eax + edi*2], cx
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x34]
call fcn.00477770
mov edi, eax
cmp edi, 0xffffffff
jne 0x4c64d0
mov ebx, 1
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebp - 0x1c]
call fcn.004cb270
cmp dword [ebp - 0x20], 8
lea eax, [ebp - 0x34]
mov edi, dword [ebp - 0x1c]
cmovae eax, dword [ebp - 0x34]
xor ecx, ecx
mov dword [ebp - 0x24], 0
mov word [eax], cx
mov eax, dword [ebp - 0x18]
mov esi, eax
cmp eax, edi
je 0x4c6666
lea ecx, [ecx]
cmp ebx, 1
jne 0x4c6663
cmp dword [ebp - 0x24], 0
je 0x4c6626
push 0x2f
push ebx
lea ecx, [ebp - 0x34]
call fcn.00433770
push 0xffffffffffffffff
push 0
add esi, 0xffffffe8
lea ecx, [ebp - 0x34]
push esi
call fcn.004336a0
cmp dword [ebp - 0x20], 8
lea eax, [ebp - 0x34]
push dword [ebp + 0xc]
cmovae eax, dword [ebp - 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x4c665f
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
cmp eax, 0xb7
cmovne ebx, ecx
cmp esi, edi
jne 0x4c6610
mov eax, dword [ebp - 0x18]
test edi, edi
je 0x4c66a6
mov esi, edi
cmp edi, eax
je 0x4c669d
cmp dword [esi + 0x14], 8
jb 0x4c6683
push dword [esi]
call fcn.004cf489
mov eax, dword [ebp - 0x18]
add esp, 4
xor ecx, ecx
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], 0
mov word [esi], cx
add esi, 0x18
cmp esi, eax
jne 0x4c6670
push edi
call fcn.004cf489
add esp, 4
cmp dword [ebp - 0x20], 8
jb 0x4c66b7
push dword [ebp - 0x34]
call fcn.004cf489
add esp, 4
mov ecx, dword [ebp - 0xc]
mov eax, ebx
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret
push str.invalid_string_position
call fcn.004ce83a
int3