Function at 0x485c00
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a55db
mov eax, dword fs:[0]
push eax
sub esp, 0x354
mov eax, dword [0x4ce4bc]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0x104
lea eax, [ebp - 0x218]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xor eax, eax
mov dword [ebp - 0x230], 0
lea ecx, [ebp - 0x218]
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x21c], 7
lea edx, [ecx + 2]
mov word [ebp - 0x230], ax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x485c72
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x230]
call fcn.00404580
cmp dword [ebp - 0x21c], 8
lea ebx, [ebp - 0x230]
mov edi, dword [ebp - 0x220]
cmovae ebx, dword [ebp - 0x230]
mov dword [ebp - 4], 0
test edi, edi
je 0x485d8a
push 0x100
lea eax, [ebp - 0x360]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov ecx, 0x4b5cd0
mov edx, 0x100
lea ecx, [ecx]
movzx eax, word [ecx]
cmp ax, dx
jae 0x485d31
movzx eax, al
add ecx, 2
mov byte [ebp + eax - 0x360], 1
cmp ecx, 0x4b5cd4
jne 0x485ce0
lea eax, [edi - 1]
or ecx, 0xffffffff
cmp eax, ecx
cmovb ecx, eax
lea esi, [ebx + ecx*2]
lea esp, [esp]
movzx eax, word [esi]
cmp ax, dx
jae 0x485d22
cmp byte [ebp + eax - 0x360], 0
jne 0x485d2b
cmp esi, ebx
je 0x485d8a
sub esi, 2
jmp 0x485d10
sub esi, ebx
sar esi, 1
jmp 0x485d8d
lea eax, [edi - 1]
or ecx, 0xffffffff
cmp eax, ecx
cmovb ecx, eax
lea esi, [ebx + ecx*2]
movzx edi, word [esi]
mov ecx, 0x5c
mov eax, 0x4b5cd0
lea edx, [ecx - 0x5a]
cmp cx, di
je 0x485d7e
cmp edx, 1
je 0x485d6a
movzx ecx, word [eax + 2]
add eax, 2
dec edx
cmp cx, di
jne 0x485d54
test eax, eax
jne 0x485d7e
cmp esi, ebx
je 0x485d73
sub esi, 2
jmp 0x485d3f
mov edi, dword [ebp - 0x220]
or esi, 0xffffffff
jmp 0x485d8d
mov edi, dword [ebp - 0x220]
sub esi, ebx
sar esi, 1
jmp 0x485d8d
or esi, 0xffffffff
xor eax, eax
mov dword [ebp - 0x260], 0
cmp edi, esi
mov word [ebp - 0x260], ax
lea eax, [ebp - 0x230]
mov dword [ebp - 0x250], 0
cmovb esi, edi
mov dword [ebp - 0x24c], 7
cmp dword [ebp - 0x21c], 8
lea ecx, [ebp - 0x260]
push esi
cmovae eax, dword [ebp - 0x230]
push eax
call fcn.00404580
push 0xc
push 0x4aacdc
lea ecx, [ebp - 0x260]
mov byte [ebp - 4], 1
call fcn.00401cd0
mov edx, eax
mov ecx, dword [edx]
mov dword [ebp - 0x248], ecx
mov ecx, dword [edx + 4]
mov dword [ebp - 0x244], ecx
mov ecx, dword [edx + 8]
mov dword [ebp - 0x240], ecx
mov ecx, dword [edx + 0xc]
mov dword [ebp - 0x23c], ecx
mov ecx, dword [edx + 0x10]
mov dword [ebp - 0x238], ecx
mov eax, dword [edx + 0x14]
mov dword [ebp - 0x234], eax
xor eax, eax
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 7
mov word [edx], ax
mov edx, dword [ebp - 0x24c]
cmp edx, 8
jb 0x485e7c
mov ecx, dword [ebp - 0x260]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x485e72
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x485e72
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0049900e
add esp, 8
cmp dword [ebp - 0x234], 8
lea eax, [ebp - 0x248]
cmovae eax, dword [ebp - 0x248]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x485ea4
test al, 0x10
jne 0x485ea4
mov bl, 1
jmp 0x485ea6
xor bl, bl
mov edx, dword [ebp - 0x234]
cmp edx, 8
jb 0x485ee2
mov ecx, dword [ebp - 0x248]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x485ed8
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x485f31
push edx
push ecx
call fcn.0049900e
add esp, 8
mov edx, dword [ebp - 0x21c]
xor eax, eax
mov dword [ebp - 0x238], 0
mov dword [ebp - 0x234], 7
mov word [ebp - 0x248], ax
cmp edx, 8
jb 0x485f41
mov ecx, dword [ebp - 0x230]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x485f37
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x485f37
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0049900e
add esp, 8
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0049901c
mov esp, ebp
pop ebp
ret