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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
cmp dword [ebp + 8], 0
jne 0x417b3d
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
or eax, 0xffffffff
jmp 0x417dc9
cmp dword [ebp + 0xc], 0
jne 0x417b56
push 0x648
call dword [sym.imp.KERNEL32.dll_SetLastError]
or eax, 0xffffffff
jmp 0x417dc9
mov eax, dword [ebp + 8]
push eax
call fcn.0041f716
add esp, 4
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 2
jne 0x417d42
mov ecx, dword [ebp + 8]
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 8]
cmp dword [edx + 0x110], 0
je 0x417ca8
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x110]
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 0x14]
sub eax, 1
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xb
ja case.0x417bad.10
mov ecx, dword [ebp - 0x14]
jmp dword [ecx*4 + 0x417dcf]
mov edx, dword [ebp - 0xc]
xor eax, eax
mov ax, word [edx + 0x152]
jmp 0x417dc9
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x15c]
jmp 0x417dc9
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx + 0x160]
jmp 0x417dc9
mov eax, 2
jmp 0x417dc9
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x144]
mov ecx, dword [eax + 0xc]
shl ecx, 4
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0x134]
mov eax, dword [eax + ecx + 8]
jmp 0x417dc9
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x144]
mov eax, dword [edx + 0xc]
shl eax, 4
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x134]
mov eax, dword [edx + eax + 4]
jmp 0x417dc9
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x144]
mov edx, dword [ecx + 0xc]
shl edx, 4
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x134]
mov eax, dword [ecx + edx + 0xc]
jmp 0x417dc9
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x110]
jmp 0x417dc9
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x11c]
jmp 0x417dc9
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x144]
mov eax, dword [edx + 8]
jmp 0x417dc9
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0xc]
mov eax, dword [eax + 0x144]
sub eax, dword [ecx + 0x138]
shr eax, 4
jmp 0x417dc9
push 0x648
call dword [sym.imp.KERNEL32.dll_SetLastError]
or eax, 0xffffffff
jmp 0x417dc9
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 0x18]
sub eax, 4
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 5
ja case.0x417cc0.4
mov ecx, dword [ebp - 0x18]
jmp dword [ecx*4 + 0x417dff]
mov eax, 2
jmp 0x417dc9
push 0
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x144]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
jmp 0x417dc9
push 0
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x144]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
jmp 0x417dc9
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x148]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
jmp 0x417dc9
push 1
push 0
push 0
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x144]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x417dc9
push 0x648
call dword [sym.imp.KERNEL32.dll_SetLastError]
or eax, 0xffffffff
jmp 0x417dc9
cmp dword [ebp - 4], 1
jne 0x417dbe
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x1c]
sub eax, 1
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0xa
ja case.0x417d66.5
mov ecx, dword [ebp - 0x1c]
jmp dword [ecx*4 + 0x417e17]
mov edx, dword [ebp - 0x10]
xor eax, eax
mov ax, word [edx + 0x152]
jmp 0x417dc9
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x15c]
jmp 0x417dc9
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx + 0x160]
jmp 0x417dc9
mov eax, 1
jmp 0x417dc9
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x14c]
jmp 0x417dc9
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x114]
jmp 0x417dc9
push 0x648
call dword [sym.imp.KERNEL32.dll_SetLastError]
or eax, 0xffffffff
jmp 0x417dc9
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
or eax, 0xffffffff
mov esp, ebp
pop ebp
ret 8