Function at 0x520448
Capabilities:
Get file attributes

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff78
mov eax, dword [0x75fabc]
cmp eax, 0xfffffffe
jne 0x520462
xor eax, eax
jmp 0x520999
lea edx, [ebp - 0x48]
push edx
push dword [ebp + 0xc]
call fcn.0066eb44
add esp, 8
inc eax
jne 0x52047b
xor eax, eax
jmp 0x520999
push 0x5c
push dword [ebp + 0xc]
call fcn.0066cf51
add esp, 8
mov dword [ebp - 0xc], eax
mov edx, dword [ebp - 0xc]
test edx, edx
jne 0x520499
xor eax, eax
jmp 0x520999
inc dword [ebp - 0xc]
xor edx, edx
mov dword [ebp - 0x10], edx
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0xc]
mov dword [ebp - 4], eax
mov edx, dword [ebp - 4]
test edx, edx
je 0x5204e1
push dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
push dword [ecx + 0x12c]
call fcn.0066d004
add esp, 8
test eax, eax
jne 0x5204d2
mov dword [ebp - 0x10], 1
jmp 0x5204e1
mov eax, dword [ebp - 4]
mov edx, dword [eax]
mov dword [ebp - 4], edx
mov ecx, dword [ebp - 4]
test ecx, ecx
jne 0x5204b1
mov eax, dword [ebp - 0x10]
test eax, eax
je case.0x520563.0
mov edx, dword [ebp - 4]
mov cl, byte [edx + 0x121]
test cl, cl
jne case.0x520563.0
mov eax, dword [0x75fabc]
inc eax
jne 0x5205b9
mov edx, dword [ebp - 4]
mov ecx, dword [edx + 0x134]
mov dword [ebp - 0x78], ecx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x110]
xor edx, edx
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x6c], edx
mov ecx, dword [ebp - 4]
mov eax, dword [ecx + 0x124]
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x64], 1
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x60], edx
mov eax, dword [ebp - 0x34]
cdq
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x54], edx
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x50], ecx
xor eax, eax
mov dword [ebp - 0x4c], eax
lea edx, [ebp - 0x78]
push edx
call fcn.004b3734
pop ecx
cmp eax, 5
ja case.0x520563.0
jmp dword [eax*4 + 0x52056a]
mov dword [0x75fabc], 1
jmp case.0x520563.0
xor eax, eax
jmp 0x520999
xor edx, edx
mov dword [0x75fabc], edx
xor eax, eax
jmp 0x520999
mov dword [0x75fabc], 0xfffffffe
xor eax, eax
jmp 0x520999
mov edx, dword [0x75fabc]
test edx, edx
jne case.0x520563.0
xor eax, eax
jmp 0x520999
mov edx, dword [ebp - 0x10]
test edx, edx
je 0x520637
mov ecx, dword [ebp - 4]
mov al, byte [ecx + 0x121]
test al, al
jne 0x520618
mov eax, dword [0x80b158]
dec eax
mov edx, dword [ebp - 4]
mov ecx, dword [edx + 0x110]
add eax, ecx
xor edx, edx
div dword [0x80b158]
mov ecx, dword [0x6ebec0]
sub ecx, eax
mov eax, dword [0x80b158]
mov edx, dword [ebp - 0x34]
add eax, edx
dec eax
cdq
idiv dword [0x80b158]
add ecx, eax
mov dword [ebp - 0x14], ecx
jmp 0x520654
mov eax, dword [0x80b158]
mov ecx, dword [ebp - 0x34]
add eax, ecx
dec eax
cdq
idiv dword [0x80b158]
mov ecx, dword [0x6ebec0]
add eax, ecx
mov dword [ebp - 0x14], eax
jmp 0x520654
mov eax, dword [0x80b158]
mov edx, dword [ebp - 0x34]
add eax, edx
dec eax
cdq
idiv dword [0x80b158]
mov ecx, dword [0x6ebec0]
add eax, ecx
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
mov edx, dword [0x80b15c]
cmp eax, edx
jle 0x520690
push 0x5a3b
call fcn.00402b9c
pop ecx
push eax
push 0xa00988
call fcn.006712b0
add esp, 8
push 0xa00988
push 0
call fcn.00462ac8
add esp, 8
xor eax, eax
jmp 0x520999
mov ecx, dword [ebp - 0x10]
test ecx, ecx
je 0x52076e
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x14c]
test edx, edx
je 0x5206c2
mov ecx, dword [ebp - 4]
push dword [ecx + 0x14c]
call fcn.00450978
pop ecx
mov eax, dword [ebp - 4]
xor edx, edx
mov dword [eax + 0x14c], edx
mov ecx, dword [ebp - 4]
mov eax, dword [ecx + 0x12c]
test eax, eax
je 0x5206e9
mov edx, dword [ebp - 4]
push dword [edx + 0x12c]
call fcn.00450978
pop ecx
mov ecx, dword [ebp - 4]
xor eax, eax
mov dword [ecx + 0x12c], eax
mov edx, dword [ebp - 4]
mov ecx, dword [edx + 0x134]
test ecx, ecx
je 0x520710
mov eax, dword [ebp - 4]
push dword [eax + 0x134]
call fcn.00450978
pop ecx
mov edx, dword [ebp - 4]
xor ecx, ecx
mov dword [edx + 0x134], ecx
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x130]
test edx, edx
je 0x520737
mov ecx, dword [ebp - 4]
push dword [ecx + 0x130]
call fcn.00450978
pop ecx
mov eax, dword [ebp - 4]
xor edx, edx
mov dword [eax + 0x130], edx
mov ecx, dword [ebp - 4]
mov al, byte [ecx + 0x121]
test al, al
jne 0x5207ad
push dword [ebp - 4]
call fcn.0051e040
pop ecx
mov eax, dword [0x80b158]
dec eax
mov edx, dword [ebp - 4]
mov ecx, dword [edx + 0x110]
add eax, ecx
xor edx, edx
div dword [0x80b158]
sub dword [0x6ebec0], eax
jmp 0x5207ad
push 0x190
call fcn.00450918
pop ecx
mov dword [ebp - 4], eax
push 0x190
push 0
push dword [ebp - 4]
call fcn.0066cc88
add esp, 0xc
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xc]
mov eax, dword [ebp - 4]
mov dword [eax], ecx
mov edx, dword [ebp + 8]
mov ecx, dword [ebp - 4]
mov dword [edx + 0xc], ecx
mov eax, dword [ebp - 4]
xor edx, edx
mov dword [eax + 0x130], edx
push dword [ebp - 0xc]
call fcn.004508d8
pop ecx
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x12c], eax
push dword [ebp + 0xc]
call fcn.004508d8
pop ecx
mov edx, dword [ebp - 4]
mov dword [edx + 0x134], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x138], eax
mov eax, dword [ebp - 4]
mov byte [eax + 0x120], 0
lea edx, [ebp - 0x2c]
push edx
call fcn.00679310
pop ecx
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x20]
test ecx, ecx
je 0x520895
mov eax, dword [ebp - 0x20]
mov dx, word [eax + 0x14]
add dx, 0x76c
mov word [ebp - 0x88], dx
mov ecx, dword [ebp - 0x20]
mov ax, word [ecx + 0x10]
inc eax
mov word [ebp - 0x86], ax
mov edx, dword [ebp - 0x20]
mov cx, word [edx + 0xc]
mov word [ebp - 0x82], cx
mov eax, dword [ebp - 0x20]
mov dx, word [eax + 8]
mov word [ebp - 0x80], dx
mov ecx, dword [ebp - 0x20]
mov ax, word [ecx + 4]
mov word [ebp - 0x7e], ax
mov edx, dword [ebp - 0x20]
mov cx, word [edx]
mov word [ebp - 0x7c], cx
mov word [ebp - 0x7a], 0
mov word [ebp - 0x84], 0
lea eax, [ebp - 0x1c]
push eax
lea edx, [ebp - 0x88]
push edx
call sub.KERNEL32.DLL_SystemTimeToFileTime
lea ecx, [ebp - 0x24]
push ecx
lea eax, [ebp - 0x22]
push eax
lea edx, [ebp - 0x1c]
push edx
call sub.KERNEL32.DLL_FileTimeToDosDateTime
movzx ecx, word [ebp - 0x22]
shl ecx, 0x10
movzx eax, word [ebp - 0x24]
add ecx, eax
mov edx, dword [ebp - 4]
mov dword [edx + 0x124], ecx
mov ecx, dword [0x6ebee4]
test ecx, ecx
jne 0x5208bf
push dword [ebp + 0xc]
call sub.KERNEL32.DLL_GetFileAttributesA
test al, 2
je 0x5208bf
mov eax, dword [ebp - 4]
or dword [eax + 0x144], 0x100
mov edx, dword [ebp - 4]
or byte [edx + 0x21], 1
test byte [ebp - 0x43], 0x40
je 0x520938
mov ecx, dword [ebp - 4]
mov byte [ecx + 0x121], 1
push 0x80b71a
push dword [ebp - 0xc]
call fcn.0066cdbc
add esp, 8
test eax, eax
jne 0x5208f0
mov eax, dword [ebp + 8]
or word [eax + 0x40], 2
jmp 0x520994
push 0x80b71c
push dword [ebp - 0xc]
call fcn.0066cdbc
add esp, 8
test eax, eax
jne 0x520911
mov edx, dword [ebp + 8]
or word [edx + 0x40], 4
jmp 0x520994
push dword [ebp - 4]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.005211f4
add esp, 0xc
mov dword [ebp - 8], eax
push dword [ebp - 4]
push dword [ebp + 0xc]
push dword [ebp - 8]
call fcn.00456568
add esp, 0xc
jmp 0x520994
mov ecx, dword [ebp - 0x34]
mov eax, dword [ebp - 4]
mov dword [eax + 0x110], ecx
mov eax, ecx
xor edx, edx
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x118], eax
mov dword [ecx + 0x11c], edx
mov eax, dword [0x80b158]
dec eax
mov edx, dword [ebp - 4]
mov ecx, dword [edx + 0x110]
add eax, ecx
xor edx, edx
div dword [0x80b158]
add dword [0x6ebec0], eax
mov eax, dword [ebp - 4]
mov byte [eax + 0x121], 0
push dword [0x80b14c]
push dword [ebp - 4]
push dword [ebp + 8]
call fcn.0051e778
add esp, 0xc
mov eax, 1
mov esp, ebp
pop ebp
ret