Function at 0x46ad76
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x130
push ebx
push esi
push edi
push 0x40
mov ebx, ecx
pop ecx
xor eax, eax
push 6
lea edi, [ebp - 0x130]
rep stosd dword es:[edi], eax
pop ecx
lea edi, [ebp - 0x30]
rep stosd dword es:[edi], eax
mov eax, dword [ebx + 0x110]
mov edx, dword [eax]
push eax
push edx
lea eax, [ebp - 0x14]
lea ecx, [ebx + 0x10c]
xor esi, esi
push eax
mov dword [ebp - 4], esi
mov dword [ebp - 0x18], ecx
call fcn.0046a572
mov eax, dword [ebx + 0x124]
push esi
mov dword [ebp - 8], eax
lea eax, [ebp - 8]
push eax
push dword [ebx + 0x120]
push dword [ebx + 0x11c]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x46adef
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
test eax, eax
je 0x46adef
call edi
jmp 0x46ae1c
push esi
lea eax, [ebp - 0xc]
push eax
mov edi, 0x100
push edi
lea eax, [ebp - 0x130]
push eax
push dword [ebx + 0x11c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x46ae16
cmp dword [ebp - 0xc], edi
je 0x46ae29
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0042f6c9
cmp eax, esi
jmp 0x46b05c
mov eax, dword [ebp - 0x130]
mov edx, dword [ebp - 0x34]
push 0x36
pop ecx
mov dword [ebx + 0x118], eax
lea edi, [ebx + 0x10]
lea esi, [ebp - 0x128]
rep movsd dword es:[edi], dword [esi]
lea eax, [ebx + 0x128]
push 6
mov edi, eax
pop ecx
lea esi, [ebp - 0x50]
rep movsd dword es:[edi], dword [esi]
mov eax, dword [eax]
mov esi, dword [ebx + 0x12c]
or esi, eax
mov ecx, dword [ebp - 0x38]
mov dword [ebx + 0x140], ecx
mov dword [ebx + 0x144], edx
je 0x46afa2
push eax
mov ecx, ebx
call fcn.00469fc0
xor edi, edi
cmp eax, edi
mov dword [ebp - 4], eax
jl 0x46b069
mov eax, dword [ebx + 0x13c]
push edi
mov dword [ebp - 8], eax
lea eax, [ebp - 8]
push eax
push dword [ebx + 0x138]
push dword [ebx + 0x11c]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x46aeca
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
je 0x46aeca
call esi
push eax
call fcn.0042f6c9
cmp eax, edi
jmp 0x46b05c
push edi
lea eax, [ebp - 0xc]
push eax
push dword [ebx + 0x130]
push dword [ebx + 0x148]
push dword [ebx + 0x11c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x46aef6
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebx + 0x130]
je 0x46af15
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0042f6c9
cmp eax, edi
pop ecx
mov dword [ebp - 4], eax
jl 0x46b069
mov dword [ebp - 4], 0x8004022d
cmp dword [ebp - 4], edi
jl 0x46b069
mov eax, dword [ebx + 0x130]
cmp eax, 4
mov edx, dword [ebx + 0x148]
jb 0x46b062
mov ebx, dword [edx]
mov ecx, ebx
imul ecx, ecx, 0x18
add eax, 0xfffffffc
add edx, 4
cmp eax, ecx
jae 0x46af4b
mov dword [ebp - 4], 0x8004022d
cmp dword [ebp - 4], edi
mov dword [ebp - 0x10], edi
jl 0x46b069
cmp dword [ebp - 0x10], ebx
jae 0x46b069
push 6
mov esi, edx
pop ecx
lea edi, [ebp - 0x30]
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 0x24]
add edx, 0x18
or eax, dword [ebp - 0x28]
mov dword [ebp - 0x14], edx
je 0x46af81
mov dword [ebp - 4], 0x8004022d
jmp 0x46af94
mov ecx, dword [ebp - 0x18]
mov eax, dword [ecx + 4]
lea edx, [ebp - 0x30]
push edx
push eax
call fcn.0046abba
mov edx, dword [ebp - 0x14]
inc dword [ebp - 0x10]
cmp dword [ebp - 4], 0
jge 0x46af57
jmp 0x46b069
mov edi, ecx
mov esi, edx
mov eax, esi
or eax, edi
je 0x46b069
push 0
lea eax, [ebp - 8]
push eax
push edi
push dword [ebx + 0x11c]
mov dword [ebp - 8], esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x46afd5
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x46b04e
push 0
lea eax, [ebp - 0xc]
push eax
push 0x18
lea eax, [ebp - 0x30]
push eax
push dword [ebx + 0x11c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x46aff7
cmp dword [ebp - 0xc], 0x18
je 0x46b012
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0042f6c9
test eax, eax
pop ecx
mov dword [ebp - 4], eax
jl 0x46b069
mov dword [ebp - 4], 0x8004022d
cmp dword [ebp - 4], 0
jl 0x46b069
mov eax, dword [ebp - 0x24]
or eax, dword [ebp - 0x28]
jne 0x46b03a
mov ecx, dword [ebp - 0x18]
mov eax, dword [ecx + 4]
lea edx, [ebp - 0x30]
push edx
push eax
call fcn.0046abba
cmp edi, dword [ebp - 0x20]
jne 0x46b043
cmp esi, dword [ebp - 0x1c]
jne 0x46b043
xor esi, esi
xor edi, edi
jmp 0x46afa6
mov edi, dword [ebp - 0x20]
mov esi, dword [ebp - 0x1c]
jmp 0x46afa6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0042f6c9
test eax, eax
pop ecx
mov dword [ebp - 4], eax
jl 0x46b069
mov dword [ebp - 4], 0x8004022d
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret