Function at 0x54f465
Capabilities:
Get file attributes
Get file size

Disassembly:
push 0xa38
mov eax, 0x66e01e
call fcn.006428e6
mov ebx, ecx
mov esi, dword [ebp + 8]
xor edi, edi
cmp dword [ebx + 0x28], edi
je 0x54f487
xor eax, eax
jmp 0x54f6db
test esi, esi
jne 0x54f490
call fcn.0050bbcb
lea eax, [ebx + 0x8c]
push eax
call fcn.0051f3de
push esi
lea ecx, [ebp - 0xa2c]
call fcn.00407b90
push edi
push 0x692ccc
lea ecx, [ebp - 0xa2c]
mov dword [ebp - 4], edi
call fcn.004086a0
cmp eax, 0xffffffff
jne 0x54f595
push edi
push 0x69cda8
lea ecx, [ebp - 0xa2c]
call fcn.004086a0
cmp eax, 0xffffffff
jne 0x54f595
push edi
push 0x69425c
lea ecx, [ebp - 0xa2c]
call fcn.004086a0
cmp eax, 0xffffffff
jne 0x54f595
push 0x104
lea eax, [ebp - 0x820]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x54f595
push edi
push edi
push edi
push edi
mov edi, 0x100
lea eax, [ebp - 0x618]
push edi
push eax
push 3
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x820]
push eax
call fcn.00658c93
push edi
lea eax, [ebp - 0x218]
push eax
push edi
lea eax, [ebp - 0x418]
xor edi, edi
push eax
push edi
push edi
push edi
push edi
push esi
call fcn.00658c93
add esp, 0x48
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x418]
push eax
lea eax, [ebp - 0x618]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0xa28]
push 0x104
push eax
call fcn.00658a55
add esp, 0x18
lea eax, [ebp - 0xa28]
lea ecx, [ebp - 0xa2c]
push eax
call fcn.00408fd0
cmp dword [ebp + 0xc], 0
jbe 0x54f5df
push edi
push edi
push 3
push edi
push 1
push closesocket
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x54f5df
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, dword [ebp + 0xc]
jbe 0x54f5df
mov ecx, dword [ebp - 0xa2c]
lea ecx, [ecx - 0x10]
call fcn.004061b0
jmp 0x54f480
mov edi, dword [ebx + 0x34]
mov esi, dword [ebp - 0xa2c]
neg edi
sbb edi, edi
and edi, 0x1000
add edi, 0x2010
call fcn.0051ae79
push edi
xor edi, edi
push edi
mov eax, dword [eax + 8]
push edi
push edi
push esi
push eax
call dword [sym.imp.USER32.dll_LoadImageW]
lea esi, [ebx + 0x8c]
mov dword [esi], eax
test eax, eax
je 0x54f5cc
lea ecx, [ebp - 0xa44]
push ecx
push 0x18
push eax
call dword [sym.imp.GDI32.dll_GetObjectW]
test eax, eax
jne 0x54f63a
push dword [esi]
call dword [sym.imp.GDI32.dll_DeleteObject]
mov dword [esi], edi
jmp 0x54f5cc
lea eax, [ebp - 0xa2c]
mov dword [ebx + 0x18], 1
push eax
lea ecx, [ebx + 0x98]
call fcn.00407d20
push dword [ebp - 0xa2c]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 1
je 0x54f66a
mov dword [ebx + 0x24], 1
mov ax, word [ebp - 0xa32]
movzx ecx, ax
mov dword [ebx + 8], ecx
push 0x20
pop edx
cmp ecx, 8
jle 0x54f698
cmp ecx, edx
jge 0x54f698
push 0xffffffffffffffff
push 0xffffffffffffffff
push edi
push esi
call fcn.0054fa36
mov ax, word [ebp - 0xa32]
push 0x20
pop edx
cmp ax, dx
jb 0x54f6a7
push dword [ebx + 0x3c]
push dword [esi]
call fcn.005505d5
mov ecx, ebx
call fcn.00551237
lea esi, [ebx + 0x90]
push esi
call fcn.0051f3de
mov dword [esi], edi
lea esi, [ebx + 0x94]
push esi
call fcn.0051f3de
mov ecx, dword [ebp - 0xa2c]
add ecx, 0xfffffff0
mov dword [esi], edi
call fcn.004061b0
xor eax, eax
inc eax
call fcn.00642890
ret 8