Function at 0x40a520
Capabilities:
Get file size
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x42b5a0
mov eax, dword fs:[0]
push eax
sub esp, 0x80
mov eax, dword [0x4424ac]
xor eax, esp
mov dword [esp + 0x7c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4424ac]
xor eax, esp
push eax
lea eax, [esp + 0x94]
mov dword fs:[0], eax
mov eax, dword [esp + 0xa4]
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40a59a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Create_Inf_file_failed__d___
call fcn.00404950
add esp, 8
xor eax, eax
jmp 0x40a7db
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x40a5cc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetFileSize_failed__d___
call fcn.00404950
add esp, 8
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x40a7db
lea ebx, [ebp + 1]
push ebx
call fcn.0040eecd
mov esi, eax
add esp, 4
test esi, esi
je 0x40a5be
push ebx
push 0
push esi
call fcn.00418350
add esp, 0xc
xor ebx, ebx
push ebx
lea eax, [esp + 0x18]
push eax
push ebp
push esi
push edi
mov dword [esp + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40a62e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ReadFile_failed__d___
call fcn.00404950
add esp, 8
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call fcn.0040eec8
add esp, 4
xor eax, eax
jmp 0x40a7db
push edi
mov byte [esi + ebp], bl
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
lea ecx, [esp + 0x40]
call fcn.00404280
push esi
mov dword [esp + 0xa0], ebx
call fcn.0040eec8
add esp, 4
push 0x42dc27
lea ecx, [esp + 0x78]
call fcn.00404280
mov edx, dword [esp + 0x54]
mov edi, dword [esp + 0x40]
mov ebp, 0x10
cmp edx, ebp
mov byte [esp + 0x9c], 1
mov eax, edi
jae 0x40a67f
lea eax, [esp + 0x40]
lea esi, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40a682
sub eax, esi
cmp edx, ebp
mov ecx, edi
jae 0x40a697
lea ecx, [esp + 0x40]
add eax, 1
push eax
push ecx
call fcn.00417f6c
add esp, 8
push 0xd
push ebx
push str.vid_12d1pid_
lea ecx, [esp + 0x48]
call fcn.00402730
cmp eax, 0xffffffff
je 0x40a7c4
mov edi, edi
push 0xd
push ebx
push str.vid_12d1pid_
lea ecx, [esp + 0x48]
call fcn.00402730
mov esi, eax
push 4
lea ecx, [esi + 0xd]
push ecx
lea edx, [esp + 0x60]
push edx
lea ecx, [esp + 0x48]
call fcn.004042f0
cmp dword [esp + 0x70], ebp
mov eax, dword [esp + 0x5c]
mov byte [esp + 0x9c], 2
jae 0x40a6fd
lea eax, [esp + 0x5c]
push eax
call fcn.00403030
add esp, 4
test eax, eax
jne 0x40a735
mov edi, dword [0x481f98]
cmp edi, dword [0x481f9c]
jbe 0x40a71d
call fcn.0041898e
lea ecx, [esp + 0x58]
push ecx
mov eax, 0x481f94
push edi
push eax
lea edx, [esp + 0x24]
push edx
mov ecx, eax
call fcn.00409fc0
cmp dword [esp + 0x54], ebp
mov eax, dword [esp + 0x40]
jae 0x40a743
lea eax, [esp + 0x40]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40a746
sub eax, edx
add eax, 0xffffffef
push eax
add esi, 0x11
push esi
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x48]
call fcn.004042f0
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [esp + 0x48]
mov byte [esp + 0xa8], 3
call fcn.00403770
cmp dword [esp + 0x38], ebp
jb 0x40a78f
mov ecx, dword [esp + 0x24]
push ecx
call fcn.0040eec8
add esp, 4
cmp dword [esp + 0x70], ebp
mov byte [esp + 0x9c], 1
jb 0x40a7aa
mov edx, dword [esp + 0x5c]
push edx
call fcn.0040eec8
add esp, 4
push 0xd
push ebx
push str.vid_12d1pid_
lea ecx, [esp + 0x48]
call fcn.00402730
cmp eax, 0xffffffff
jne 0x40a6c0
lea ecx, [esp + 0x74]
call fcn.004031e0
lea ecx, [esp + 0x3c]
call fcn.004031e0
mov eax, 1
mov ecx, dword [esp + 0x94]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x7c]
xor ecx, esp
call fcn.00417b3b
add esp, 0x8c
ret