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

Disassembly:
sub esp, 0x14
push ebp
push edi
xor edi, edi
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ebp, dword [esp + 0x20]
test ebp, ebp
je 0x417bcc
push ebp
call fcn.00412fb0
add esp, 4
test eax, eax
jne 0x417bcc
push ebx
push esi
push ebp
call fcn.00417be0
mov esi, eax
add esp, 4
test esi, esi
je 0x417926
call fcn.00418780
mov ebx, eax
mov dword [esp + 0x14], ebx
test ebx, ebx
je 0x417bab
mov ebp, esi
push ebp
call fcn.00412fb0
add esp, 4
test eax, eax
je 0x41786f
mov dword [esp + 0x1c], str.system32_
lea ebx, [esp + 0x1c]
mov dword [esp + 0x20], str.SystemRoot_system32_
nop word [eax + eax]
mov ecx, dword [ebx]
mov esi, ecx
lea edx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x4176f7
sub esi, edx
sar esi, 1
push esi
push ecx
push ebp
call fcn.0048143a
add esp, 0xc
test eax, eax
je 0x417725
add ebx, 4
lea eax, [esp + 0x24]
cmp ebx, eax
jb 0x4176f0
jmp 0x41781a
mov edi, dword [esp + 0x14]
lea esi, [esi*2]
mov ecx, edi
add esi, ebp
mov dword [esp + 0x1c], esi
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x417740
sub ecx, edx
sar ecx, 1
test esi, esi
jne 0x41777c
lea esi, [ecx + 1]
lea eax, [esi + esi]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
je 0x417818
push dword [esp + 0x14]
push esi
push edi
call fcn.00416a40
jmp 0x41780a
mov edx, esi
lea eax, [edx + 2]
mov dword [esp + 0x18], eax
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x417785
sub edx, dword [esp + 0x18]
sar edx, 1
test ecx, ecx
je 0x4177b3
cmp word [edi + ecx*2 - 2], 0x5c
je 0x4177b3
test edx, edx
je 0x4177b3
cmp word [esi], 0x5c
je 0x4177b3
mov eax, 1
jmp 0x4177b5
xor eax, eax
mov dword [esp + 0x18], eax
add eax, ecx
add eax, edx
lea esi, [eax*2 + 2]
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
je 0x41781a
push dword [esp + 0x14]
push esi
push edi
call fcn.004168e0
test eax, eax
js 0x41780e
cmp dword [esp + 0x18], 0
je 0x4177fc
push 0x4bcc74
push esi
push edi
lfence
call fcn.00416840
test eax, eax
js 0x41780e
lfence
push dword [esp + 0x1c]
push esi
push edi
call fcn.00416840
test eax, eax
jns 0x41781a
push edi
lfence
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor edi, edi
lea eax, [esp + 0x24]
cmp ebx, eax
jne 0x41791b
movzx eax, word [ebp]
cmp eax, 0x5c
je 0x417862
cmp eax, 0x2f
je 0x417862
push eax
call fcn.00480be0
add esp, 4
test eax, eax
je 0x41791b
cmp word [ebp + 2], 0x3a
jne 0x41791b
movzx eax, word [ebp + 4]
cmp eax, 0x5c
je 0x417862
cmp eax, 0x2f
jne 0x41791b
push dword [esp + 0x14]
mov edi, ebp
xor esi, esi
jmp 0x417ba5
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x417874
sub ecx, edx
mov edx, ebp
sar ecx, 1
lea esi, [edx + 2]
nop dword [eax + eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x417890
sub edx, esi
sar edx, 1
test ecx, ecx
je 0x4178bd
cmp word [ebx + ecx*2 - 2], 0x5c
je 0x4178bd
test edx, edx
je 0x4178bd
cmp word [ebp], 0x5c
je 0x4178bd
mov ebx, 1
jmp 0x4178bf
xor ebx, ebx
lea eax, [ebx + edx]
add eax, ecx
lea esi, [eax*2 + 2]
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
je 0x41791b
push dword [esp + 0x14]
push esi
push edi
call fcn.004168e0
test eax, eax
js 0x41790f
test ebx, ebx
je 0x417900
push 0x4bcc74
push esi
push edi
lfence
call fcn.00416840
test eax, eax
js 0x41790f
push ebp
push esi
push edi
lfence
call fcn.00416840
test eax, eax
jns 0x41791b
push edi
lfence
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor edi, edi
push dword [esp + 0x14]
mov esi, ebp
jmp 0x417ba5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7e
jne 0x417a9d
mov esi, ebp
lea ecx, [esi + 2]
nop word [eax + eax]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x417940
sub esi, ecx
push ebp
sar esi, 1
call fcn.00413d80
mov ecx, eax
add esp, 4
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x417960
sub ecx, edx
sar ecx, 1
sub ecx, edi
je 0x417a5e
sub ecx, 1
je 0x4179bb
mov ecx, ebp
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x417981
sub ecx, edx
sar ecx, 1
lea ebx, [ecx + 1]
lea eax, [ebx + ebx]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
je 0x417a9d
push ebp
push ebx
push esi
call fcn.00416a40
test eax, eax
jns 0x417a3d
jmp 0x417a31
lea ecx, [esi - 1]
mov dword [esp + 0x1c], ecx
test ecx, ecx
js 0x417a9d
mov ebx, ebp
lfence
lea edx, [ebx + 2]
mov ax, word [ebx]
add ebx, 2
test ax, ax
jne 0x4179d2
sub ebx, edx
sar ebx, 1
cmp ecx, ebx
cmovb ebx, ecx
inc ebx
lea eax, [ebx + ebx]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
je 0x417a9d
test ebx, ebx
je 0x417a31
cmp ebx, 0x7fffffff
ja 0x417a28
mov eax, dword [esp + 0x1c]
cmp eax, 0x7ffffffe
ja 0x417a2c
push eax
push ebp
push 0
push ebx
push esi
lfence
call fcn.00416ab0
test eax, eax
jns 0x417a3d
jmp 0x417a31
test ebx, ebx
je 0x417a31
xor eax, eax
mov word [esi], ax
push esi
lfence
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor esi, esi
test esi, esi
je 0x417a9d
push 0x37e4
call fcn.004160d0
add esp, 4
test eax, eax
je 0x417ab9
push 0
call fcn.004183c0
add esp, 4
jmp 0x417abe
lea ebx, [esi*2 + 0xa]
push ebx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
je 0x417a9d
push ebp
push ebx
push esi
call fcn.004168e0
lfence
test eax, eax
js 0x417a96
push str..dll
push ebx
push esi
call fcn.00416840
test eax, eax
jns 0x417a41
lfence
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x417aaf
push 0x7e
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop esi
pop ebx
mov eax, edi
pop edi
pop ebp
add esp, 0x14
ret
call fcn.00418780
mov ebx, eax
test ebx, ebx
je 0x417bab
mov ecx, ebx
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x417ad0
sub ecx, edx
mov edx, esi
sar ecx, 1
lea edi, [edx + 2]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x417ae4
sub edx, edi
sar edx, 1
test ecx, ecx
je 0x417b10
cmp word [ebx + ecx*2 - 2], 0x5c
je 0x417b10
test edx, edx
je 0x417b10
cmp word [esi], 0x5c
je 0x417b10
mov eax, 1
jmp 0x417b12
xor eax, eax
mov dword [esp + 0x18], eax
add eax, edx
add eax, ecx
lea ebp, [eax*2 + 2]
push ebp
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
je 0x417ba4
push ebx
push ebp
push edi
call fcn.004168e0
test eax, eax
jns 0x417b41
lfence
jmp 0x417b9b
cmp dword [esp + 0x18], 0
je 0x417b60
push 0x4bcc74
push ebp
push edi
lfence
call fcn.00416840
test eax, eax
jns 0x417b60
lfence
jmp 0x417b9b
push esi
push ebp
push edi
lfence
call fcn.00416840
test eax, eax
jns 0x417b74
lfence
jmp 0x417b9b
test edi, edi
je 0x417ba4
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x417b88
test al, 0x50
je 0x417ba4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x417b9b
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor edi, edi
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
test edi, edi
je 0x417a9d
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop esi
pop ebx
mov eax, edi
pop edi
pop ebp
add esp, 0x14
ret
push 0xa0
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
xor eax, eax
pop ebp
add esp, 0x14
ret