Function at 0x40685a
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
push ebx
push esi
push edi
xor ebx, ebx
push ebx
push 0x80
push 3
push ebx
push 1
push 0x80000000
push dword [ebp + 8]
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0xc], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 4], eax
cmp eax, 0xffffffff
je 0x406b3c
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
lea ecx, [ebp - 0xc]
push ecx
push 0xc
lea ecx, [ebp - 0x40]
push ecx
push eax
call esi
mov eax, dword [ebp - 0x3c]
movzx ecx, byte [ebp - 0x40]
movzx edx, byte [ebp - 0x3e]
shr eax, 8
movzx edi, al
movzx eax, byte [ebp - 0x3c]
shl ax, 8
or di, ax
mov eax, dword [ebp - 0x40]
shr eax, 8
shl cx, 8
movzx eax, al
or ax, cx
mov word [ebp - 0x3c], di
mov ecx, dword [ebp - 0x3e]
shr ecx, 8
movzx ecx, cl
shl dx, 8
or cx, dx
mov word [ebp - 0x40], ax
mov word [ebp - 0x3e], cx
cmp ax, 1
jne 0x406b41
cmp cx, bx
jne 0x406b41
xor eax, eax
mov dword [ebp - 8], ebx
cmp ax, di
jae 0x406b33
push ebx
lea eax, [ebp - 0xc]
push eax
push 0x10
lea eax, [ebp - 0x60]
push eax
push dword [ebp - 4]
call esi
push 5
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea eax, [ebp - 0x20]
push eax
push str.name
mov byte [ebp - 0x1c], bl
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x406954
movzx eax, word [ebp - 0x3c]
inc dword [ebp - 8]
cmp dword [ebp - 8], eax
jl 0x40690d
jmp 0x406b33
movzx ecx, byte [ebp - 0x54]
mov edx, dword [ebp - 0x54]
mov eax, dword [ebp - 0x54]
shr edx, 8
shl cx, 8
movzx edx, dl
movzx ecx, cx
or ecx, edx
shr eax, 0x10
movzx edx, al
shl dx, 8
shr eax, 8
movzx edx, dx
movzx eax, al
shl ecx, 0x10
or ecx, edx
mov edx, dword [ebp - 0x58]
or ecx, eax
movzx eax, byte [ebp - 0x58]
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
shl ax, 8
shr edx, 8
mov dword [ebp - 0x54], ecx
mov ecx, dword [ebp - 0x58]
movzx eax, ax
movzx edx, dl
or eax, edx
shr ecx, 0x10
movzx edx, cl
shl dx, 8
movzx edx, dx
shr ecx, 8
shl eax, 0x10
movzx ecx, cl
push ebx
or eax, edx
or eax, ecx
push ebx
push eax
push dword [ebp - 4]
mov dword [ebp - 0x58], eax
call edi
push ebx
lea eax, [ebp - 0xc]
push eax
push 6
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 4]
call esi
mov eax, dword [ebp - 0x26]
movzx ecx, byte [ebp - 0x26]
movzx edx, byte [ebp - 0x24]
shr eax, 8
shl cx, 8
movzx eax, al
or ax, cx
mov ecx, dword [ebp - 0x24]
shr ecx, 8
movzx ecx, cl
shl dx, 8
or cx, dx
mov word [ebp - 0x24], cx
xor ecx, ecx
mov word [ebp - 0x26], ax
mov dword [ebp - 8], ebx
cmp cx, ax
jae 0x406b33
push ebx
lea eax, [ebp - 0xc]
push eax
push 0xc
lea eax, [ebp - 0x50]
push eax
push dword [ebp - 4]
call esi
mov eax, dword [ebp - 0x4a]
movzx ecx, byte [ebp - 0x4a]
shr eax, 8
movzx eax, al
shl cx, 8
or ax, cx
mov word [ebp - 0x4a], ax
cmp ax, 5
jne 0x406ad8
mov eax, dword [ebp - 0x48]
movzx ecx, byte [ebp - 0x48]
shr eax, 8
movzx eax, al
shl cx, 8
or ax, cx
movzx ecx, byte [ebp - 0x46]
mov word [ebp - 0x48], ax
mov eax, dword [ebp - 0x46]
push 1
shr eax, 8
push ebx
movzx eax, al
shl cx, 8
push ebx
push dword [ebp - 4]
or ax, cx
mov word [ebp - 0x46], ax
call edi
movzx ecx, word [ebp - 0x24]
mov dword [ebp - 0x18], eax
movzx eax, word [ebp - 0x46]
add eax, dword [ebp - 0x58]
push ebx
push ebx
add ecx, eax
push ecx
push dword [ebp - 4]
call edi
movzx eax, word [ebp - 0x48]
inc eax
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push ebx
lea ecx, [ebp - 0xc]
push ecx
movzx ecx, word [ebp - 0x48]
push ecx
push eax
push dword [ebp - 4]
mov dword [ebp - 0x10], eax
call esi
mov eax, dword [ebp - 0x10]
cmp byte [eax], bl
jne 0x406aea
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push ebx
push ebx
push dword [ebp - 0x18]
push dword [ebp - 4]
call edi
movzx eax, word [ebp - 0x26]
inc dword [ebp - 8]
cmp dword [ebp - 8], eax
jl 0x406a1c
jmp 0x406b33
push 9
push eax
mov edi, eax
lea eax, [ebp - 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
push str.Version
lea eax, [ebp - 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
jne 0x406b12
mov edi, dword [ebp - 0x10]
add edi, 8
push dword [ebp + 0x10]
movzx eax, word [ebp - 0x48]
mov esi, dword [ebp + 0xc]
push esi
push eax
push edi
xor edi, edi
inc edi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
xor ecx, ecx
mov word [esi + eax*2], cx
mov dword [ebp - 0x14], edi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x14]
jmp 0x406b43
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret