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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x58ce93
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [0x5ed80c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
mov eax, dword [ebx]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x503d49
mov eax, dword [ebx]
mov ecx, dword [eax - 0xc]
test ecx, ecx
js 0x503be1
push 0x59c92c
push eax
call fcn.0055d5be
add esp, 8
test eax, eax
je 0x503be1
sub eax, dword [ebx]
sar eax, 1
cmp eax, 0xffffffff
jne 0x503bfe
mov ebx, dword [ebx]
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [0x5ec59c]
mov edx, dword [eax + 0xc]
mov ecx, 0x5ec59c
call edx
add eax, 0x10
mov dword [ebp + 8], eax
mov eax, dword [ebx]
mov ecx, dword [eax - 0xc]
mov dword [ebp - 4], 0
test ecx, ecx
jle 0x503d23
push 0x5c
push eax
call fcn.0056101e
add esp, 8
test eax, eax
je 0x503d23
sub eax, dword [ebx]
sar eax, 1
mov edi, eax
cmp edi, 0xffffffff
je 0x503d23
push edi
push 0
lea eax, [ebp - 0x14]
push eax
mov ecx, ebx
call fcn.00505750
mov ecx, dword [eax]
mov esi, dword [ebp + 8]
lea eax, [ecx - 0x10]
add esi, 0xfffffff0
mov byte [ebp - 4], 1
cmp eax, esi
je 0x503cb3
cmp dword [esi + 0xc], 0
jl 0x503ca6
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x503ca6
push eax
call fcn.00505070
mov dword [ebp - 0x10], eax
add esp, 4
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x503c9b
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov esi, dword [ebp - 0x10]
add esi, 0x10
mov dword [ebp + 8], esi
jmp 0x503cb6
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [ebp + 8]
call fcn.00505950
mov esi, dword [ebp + 8]
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x503cd9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x503cf2
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x503d60
mov ecx, dword [ebx]
mov edx, dword [ecx - 0xc]
lea eax, [edi + 1]
test eax, eax
js 0x503d23
cmp eax, edx
jge 0x503d23
lea ecx, [ecx + eax*2]
push 0x5c
push ecx
call fcn.0056101e
add esp, 8
test eax, eax
je 0x503d23
sub eax, dword [ebx]
sar eax, 1
mov edi, eax
cmp edi, 0xffffffff
jne 0x503c49
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x503d49
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 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
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea edx, [esi + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x503d83
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret