Function at 0x4063b8
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
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 - 0x10], ebx
mov dword [ebp - 0xc], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 8], eax
cmp eax, 0xffffffff
je 0x4066e6
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
lea ecx, [ebp - 0xc]
push ecx
push 0xc
lea ecx, [ebp - 0x2c]
push ecx
push eax
call esi
mov eax, dword [ebp - 0x28]
movzx cx, byte [ebp - 0x2c]
movzx dx, byte [ebp - 0x2a]
shr eax, 8
movzx di, al
movzx ax, byte [ebp - 0x28]
shl ax, 8
or di, ax
mov eax, dword [ebp - 0x2c]
shr eax, 8
shl cx, 8
movzx ax, al
or ax, cx
mov word [ebp - 0x28], di
mov ecx, dword [ebp - 0x2a]
shr ecx, 8
movzx cx, cl
shl dx, 8
or cx, dx
mov word [ebp - 0x2c], ax
mov word [ebp - 0x2a], cx
cmp ax, 1
jne 0x4066eb
cmp cx, bx
jne 0x4066eb
xor eax, eax
mov dword [ebp - 4], ebx
cmp ax, di
jae 0x4066dd
push ebx
lea eax, [ebp - 0xc]
push eax
push 0x10
lea eax, [ebp - 0x4c]
push eax
push dword [ebp - 8]
call esi
push 5
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea eax, [ebp - 0x18]
push eax
push str.name
mov byte [ebp - 0x14], bl
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x4064b8
movzx eax, word [ebp - 0x28]
inc dword [ebp - 4]
cmp dword [ebp - 4], eax
jl 0x406471
jmp 0x4066dd
mov ecx, dword [ebp - 0x40]
movzx dx, cl
mov eax, ecx
shl dx, 8
movzx edx, dx
shr ecx, 8
movzx ecx, cl
or edx, ecx
shr eax, 0x10
movzx cx, al
shr eax, 8
shl cx, 8
shl edx, 0x10
movzx eax, al
movzx ecx, cx
or edx, ecx
or edx, eax
mov dword [ebp - 0x40], edx
mov edx, dword [ebp - 0x44]
movzx ax, dl
mov ecx, edx
shl ax, 8
shr edx, 8
movzx eax, ax
movzx edx, dl
or eax, edx
shr ecx, 0x10
movzx dx, 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 - 8]
mov dword [ebp - 0x44], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
lea eax, [ebp - 0xc]
push eax
push 6
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 8]
call esi
mov eax, dword [ebp - 0x1e]
movzx cx, byte [ebp - 0x1e]
movzx dx, byte [ebp - 0x1c]
shr eax, 8
shl cx, 8
movzx ax, al
or ax, cx
mov ecx, dword [ebp - 0x1c]
shr ecx, 8
movzx cx, cl
shl dx, 8
or cx, dx
mov word [ebp - 0x1c], cx
xor ecx, ecx
mov word [ebp - 0x1e], ax
mov dword [ebp - 4], ebx
cmp cx, ax
jae 0x4066dd
push ebx
lea eax, [ebp - 0xc]
push eax
push 0xc
lea eax, [ebp - 0x3c]
push eax
push dword [ebp - 8]
call esi
mov eax, dword [ebp - 0x36]
movzx cx, byte [ebp - 0x36]
movzx dx, byte [ebp - 0x3c]
shl cx, 8
shr eax, 8
movzx ax, al
or ax, cx
mov ecx, dword [ebp - 0x3c]
shr ecx, 8
movzx cx, cl
shl dx, 8
or cx, dx
movzx dx, byte [ebp - 0x38]
mov word [ebp - 0x3c], cx
mov word [ebp - 0x36], ax
mov ecx, dword [ebp - 0x38]
shr ecx, 8
movzx cx, cl
shl dx, 8
or cx, dx
movzx dx, byte [ebp - 0x32]
mov word [ebp - 0x38], cx
mov ecx, dword [ebp - 0x34]
shr ecx, 8
movzx di, cl
movzx cx, byte [ebp - 0x34]
shl cx, 8
or di, cx
mov ecx, dword [ebp - 0x32]
shr ecx, 8
movzx cx, cl
shl dx, 8
movzx eax, ax
or cx, dx
mov word [ebp - 0x34], di
mov word [ebp - 0x32], cx
cmp eax, dword [ebp + 0xc]
jne 0x40662e
cmp word [ebp - 0x3c], 3
jne 0x40662e
mov eax, 0x409
cmp word [ebp - 0x38], ax
je 0x406643
movzx eax, word [ebp - 0x1e]
inc dword [ebp - 4]
cmp dword [ebp - 4], eax
jl 0x406582
jmp 0x4066dd
movzx eax, cx
movzx ecx, word [ebp - 0x1c]
add eax, dword [ebp - 0x44]
push ebx
push ebx
add ecx, eax
push ecx
push dword [ebp - 8]
movzx edi, di
shr edi, 1
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
movzx eax, word [ebp - 0x34]
inc eax
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 - 0x34]
push ecx
push eax
push dword [ebp - 8]
mov dword [ebp - 4], eax
call esi
xor ecx, ecx
cmp edi, ebx
jle 0x4066a6
mov eax, dword [ebp - 4]
lea eax, [eax + ecx*2]
movzx si, byte [eax]
movzx dx, byte [eax + 1]
shl si, 8
or dx, si
inc ecx
cmp ecx, edi
mov word [eax], dx
jl 0x406688
mov esi, dword [ebp + 0x10]
mov eax, dword [ebp - 4]
push ebx
push ebx
push dword [ebp + 0x14]
xor ecx, ecx
push esi
push edi
push eax
push ebx
push 0x4e4
mov word [eax + edi*2], cx
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov byte [eax + esi], bl
cmp eax, ebx
je 0x4066d4
mov dword [ebp - 0x10], 1
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10]
jmp 0x4066ed
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret