Function at 0x4dafe0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x130
mov eax, dword [0x6c10c8]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, edx
mov dword [ebp - 0x10c], ecx
mov ecx, dword [ebp + 0x14]
xor edx, edx
push ebx
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 0x130], eax
mov dword [eax], edx
mov dword [eax + 4], edx
mov eax, ebx
or eax, ecx
mov dword [ebp - 0xd0], ebx
push esi
push edi
mov edi, dword [ebp + 0x18]
mov dword [ebp - 0x110], edi
mov dword [ebp - 0x118], ecx
je 0x4db7d1
mov eax, dword [edi]
mov ecx, edi
mov dword [ebp - 0xc8], edx
mov dword [ebp - 0xcc], edx
mov dword [ebp - 0xdc], edx
call dword [eax + 0xc]
mov edx, dword [edi]
mov ecx, edi
mov dword [ebp - 0x128], eax
call dword [edx + 0x14]
mov esi, dword [edi]
mov ecx, edi
mov dword [ebp - 0xc4], eax
mov dword [ebp - 0xd4], edx
call dword [esi + 0xc]
test eax, eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0xf8], eax
je 0x4db082
movzx ecx, ax
mov eax, 0x10000
sub eax, ecx
jmp 0x4db087
mov eax, 0x10000
mov ecx, dword [ebp + 0x14]
xor edx, edx
mov dword [ebp - 0x120], eax
cmp edx, ecx
jb 0x4db0a4
ja 0x4db09c
cmp eax, ebx
jb 0x4db0a4
mov eax, ebx
mov dword [ebp - 0x120], eax
sub ebx, eax
mov eax, ecx
push 4
sbb eax, edx
mov ecx, edi
add ebx, 0x1ffff
adc eax, edx
shrd ebx, eax, 0x10
shr eax, 0x10
pop eax
cmp ebx, eax
cmovg ebx, eax
mov eax, dword [edi]
call dword [eax + 0x10]
test eax, eax
jne 0x4db0d4
push 0x40
pop eax
cmp ebx, eax
cmovg ebx, eax
mov eax, dword [edi]
mov ecx, edi
push ebx
call dword [eax]
mov esi, eax
mov dword [ebp - 0xc0], esi
test esi, esi
js 0x4db77d
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x18]
mov esi, eax
mov dword [ebp - 0xc0], esi
test esi, esi
js 0x4db77d
xor esi, esi
mov dword [ebp - 0xe0], esi
test ebx, ebx
jle 0x4db749
mov ecx, dword [ebp + 0xc]
lea eax, [ebp - 0xbc]
mov dword [ebp - 0xe4], eax
lea edx, [ebp - 0x9c]
lea eax, [ebp - 0x98]
mov dword [ebp - 0xd8], edx
mov dword [ebp - 0x104], eax
lea eax, [ebp - 0xb4]
mov dword [ebp - 0xf4], eax
lea eax, [ebp - 0xa8]
mov dword [ebp - 0xf0], eax
lea eax, [ebp - 0xac]
mov dword [ebp - 0xec], eax
lea eax, [ebp - 0xa0]
mov dword [ebp - 0xe8], eax
lea eax, [ebp - 0xa4]
mov dword [ebp - 0x108], eax
mov dword [ebp - 0xfc], ecx
mov ecx, dword [ebp - 0x118]
test ecx, ecx
jne 0x4db191
cmp dword [ebp - 0xd0], ecx
jbe 0x4db42c
cmp dword [ebp - 0xc8], esi
jne 0x4db210
xor ecx, ecx
push 0x1f0003
push ecx
push ecx
push ecx
mov dword [eax + 0xc], ecx
mov dword [eax], ecx
call dword [sym.imp.KERNEL32.dll_CreateEventExW]
mov edx, dword [ebp - 0x108]
mov dword [edx], eax
test eax, eax
jne 0x4db1e8
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
mov dword [ebp - 0xc0], esi
test esi, esi
jne 0x4db77d
mov esi, dword [ebp - 0xe0]
mov edx, dword [ebp - 0x108]
mov ecx, dword [ebp - 0xc8]
mov eax, dword [edx]
mov dword [ebp + ecx*4 - 0x18], eax
inc ecx
add edx, 0x28
mov dword [ebp - 0xc8], ecx
mov ecx, dword [ebp - 0x118]
mov dword [ebp - 0x108], edx
mov edx, dword [ebp - 0xd8]
cmp dword [ebp - 0x128], 0
je 0x4db228
and dword [ebp - 0x128], 0
mov eax, dword [ebp - 0x120]
jmp 0x4db255
test ecx, ecx
jb 0x4db249
ja 0x4db23b
mov eax, dword [ebp - 0xd0]
cmp eax, 0x10000
jbe 0x4db24f
and dword [ebp - 0x118], 0
mov eax, 0x10000
jmp 0x4db255
mov eax, dword [ebp - 0xd0]
mov dword [ebp - 0x118], ecx
push dword [ebp - 0xd4]
mov dword [edx], eax
mov eax, dword [ebp - 0xd0]
sub eax, dword [edx]
push dword [ebp - 0xc4]
mov dword [ebp - 0xd0], eax
sbb ecx, 0
mov eax, dword [edi]
mov dword [ebp - 0x118], ecx
mov ecx, edi
push esi
call dword [eax + 4]
mov ecx, dword [ebp - 0xe8]
mov edx, dword [ebp - 0xc4]
mov edi, dword [ebp - 0xf8]
push dword [ebp - 0xf4]
mov dword [ecx], eax
mov ecx, dword [ebp - 0xe4]
mov dword [ecx], edx
mov edx, dword [ebp - 0xd4]
mov dword [ecx + 4], edx
mov ecx, dword [ebp - 0xd8]
mov edx, dword [ebp - 0xc4]
add edx, dword [ecx]
mov dword [ebp - 0xc4], edx
mov edx, dword [ebp - 0xd4]
adc edx, 0
mov dword [ebp - 0xd4], edx
mov edx, dword [ebp - 0xec]
mov dword [edx], edi
mov edx, dword [ebp - 0xf0]
mov edi, dword [ebp - 0xfc]
mov dword [edx], edi
mov edx, dword [ebp - 0xf8]
add edx, dword [ecx]
mov dword [ebp - 0xf8], edx
lea edx, [ebp - 0x100]
push edx
push dword [ecx]
adc edi, 0
and dword [ebp - 0x100], 0
push eax
push dword [ebp - 0x10c]
mov dword [ebp - 0xfc], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edi, dword [ebp - 0x110]
test eax, eax
jne 0x4db349
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x4db772
mov eax, dword [ebp - 0x104]
inc dword [ebp - 0xcc]
mov dword [eax], 1
jmp 0x4db36e
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x10]
test eax, eax
je 0x4db379
test esi, esi
je 0x4db379
push dword [ebp + esi*4 - 0x18]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov eax, dword [ebp - 0x104]
mov dword [eax], 2
mov edx, dword [ebp - 0xd8]
push 0x28
pop ecx
jmp 0x4db3e8
mov ecx, dword [ebp - 0xd8]
mov eax, dword [ebp - 0x100]
cmp eax, dword [ecx]
jne 0x4db772
push dword [ebp - 0x130]
mov eax, dword [edi]
mov ecx, edi
push dword [ebp - 0xe4]
call dword [eax + 8]
mov esi, eax
mov dword [ebp - 0xc0], esi
test esi, esi
js 0x4db77d
mov esi, dword [ebp - 0xe0]
mov eax, dword [ebp - 0x104]
dec esi
mov edx, dword [ebp - 0xd8]
push 0x28
pop ecx
sub dword [ebp - 0xe8], ecx
sub eax, ecx
sub dword [ebp - 0xec], ecx
sub edx, ecx
sub dword [ebp - 0xf0], ecx
sub dword [ebp - 0xf4], ecx
sub dword [ebp - 0xe4], ecx
add dword [ebp - 0xe8], ecx
inc esi
add dword [ebp - 0xec], ecx
add eax, ecx
add dword [ebp - 0xf0], ecx
add edx, ecx
add dword [ebp - 0xf4], ecx
add dword [ebp - 0xe4], ecx
mov dword [ebp - 0xe0], esi
mov dword [ebp - 0x104], eax
mov dword [ebp - 0xd8], edx
cmp esi, ebx
jge 0x4db42c
mov eax, dword [ebp - 0x108]
jmp 0x4db17b
mov ebx, dword [ebp - 0xc8]
cmp ebx, esi
je 0x4db455
dec ebx
imul esi, ebx, 0x28
mov dword [ebp - 0xc8], ebx
push dword [ebp + esi - 0xa4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
and dword [ebp + esi - 0xa4], 0
cmp dword [ebp - 0xcc], 0
jle 0x4db749
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x10]
test eax, eax
je 0x4db4d5
imul eax, dword [ebp - 0xdc], 0x28
cmp dword [ebp + eax - 0x98], 1
jne 0x4db4d5
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x18]
mov esi, eax
mov dword [ebp - 0xc0], esi
test esi, esi
js 0x4db77d
mov eax, dword [ebp - 0xdc]
mov esi, dword [ebp + eax*4 - 0x18]
call fcn.0048c955
movzx eax, al
or edx, 0xffffffff
push eax
push 0
mov ecx, esi
call fcn.0048c66f
pop ecx
pop ecx
test eax, eax
jne 0x4db772
mov ebx, dword [ebp - 0xdc]
mov dword [ebp - 0xe0], ebx
cmp ebx, 0xffffffff
jne 0x4db503
mov ebx, dword [ebp - 0xc8]
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x18]
mov esi, eax
mov dword [ebp - 0xc0], esi
test esi, esi
js 0x4db77d
push 0
push 0xffffffffffffffff
push ecx
lea edx, [ebp - 0x18]
mov ecx, ebx
call fcn.0048c7a6
mov ebx, eax
mov dword [ebp - 0xe0], eax
and dword [ebp - 0x100], 0
lea eax, [ebp - 0x100]
imul esi, ebx, 0x28
push 0
push eax
lea eax, [ebp - 0xb4]
add eax, esi
mov dword [ebp - 0x128], esi
push eax
push dword [ebp - 0x10c]
mov dword [ebp + esi - 0x98], 2
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
jne 0x4db568
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
mov dword [ebp - 0xc0], esi
test esi, esi
jne 0x4db77d
mov esi, dword [ebp - 0x128]
mov eax, dword [ebp - 0x100]
cmp eax, dword [ebp + esi - 0x9c]
jne 0x4db772
mov eax, dword [edi]
mov ecx, edi
dec dword [ebp - 0xcc]
call dword [eax + 0x10]
test eax, eax
je 0x4db598
cmp dword [ebp - 0xdc], ebx
jne 0x4db735
cmp dword [ebp + esi - 0x98], 2
jne 0x4db735
push dword [ebp - 0x130]
mov eax, dword [edi]
lea ecx, [ebp - 0xbc]
imul ebx, ebx, 0x28
add ecx, ebx
push ecx
mov ecx, edi
call dword [eax + 8]
mov esi, eax
mov dword [ebp - 0xc0], esi
test esi, esi
js 0x4db77d
mov eax, dword [ebp - 0xdc]
xor esi, esi
mov edx, dword [ebp - 0x118]
inc eax
xor ecx, ecx
mov dword [ebp + ebx - 0x98], esi
cmp eax, dword [ebp - 0xc8]
cmove eax, ecx
mov ecx, dword [ebp - 0xd0]
mov dword [ebp - 0xdc], eax
mov eax, ecx
or eax, edx
je 0x4db718
cmp edx, esi
jb 0x4db621
ja 0x4db614
cmp ecx, 0x10000
jbe 0x4db621
mov eax, 0x10000
mov dword [ebp - 0x128], esi
jmp 0x4db629
mov eax, ecx
mov dword [ebp - 0x128], edx
push dword [ebp - 0xd4]
sub ecx, eax
mov dword [ebp + ebx - 0x9c], eax
push dword [ebp - 0xc4]
mov eax, dword [edi]
sbb edx, esi
mov esi, dword [ebp - 0xe0]
mov dword [ebp - 0xd0], ecx
mov ecx, edi
push esi
mov dword [ebp - 0x118], edx
call dword [eax + 4]
mov ecx, dword [ebp + ebx - 0x9c]
mov edx, eax
mov eax, dword [ebp - 0xc4]
add dword [ebp - 0xc4], ecx
mov edi, dword [ebp - 0xfc]
mov dword [ebp + ebx - 0xbc], eax
mov eax, dword [ebp - 0xd4]
mov dword [ebp + ebx - 0xb8], eax
adc eax, 0
mov dword [ebp - 0xd4], eax
mov eax, dword [ebp - 0xf8]
mov dword [ebp + ebx - 0xac], eax
add eax, ecx
mov dword [ebp - 0xf8], eax
lea eax, [ebp - 0xb4]
adc dword [ebp - 0xfc], 0
add eax, ebx
push eax
push 0
push ecx
push edx
push dword [ebp - 0x10c]
mov dword [ebp + ebx - 0xa0], edx
mov dword [ebp + ebx - 0xa8], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edi, dword [ebp - 0x110]
test eax, eax
jne 0x4db703
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x4db772
inc dword [ebp - 0xcc]
mov dword [ebp + ebx - 0x98], 1
jmp 0x4db718
push dword [ebp + esi*4 - 0x18]
mov dword [ebp + ebx - 0x98], 2
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov ebx, dword [ebp - 0xdc]
imul eax, ebx, 0x28
mov dword [ebp - 0xe0], ebx
cmp dword [ebp + eax - 0x98], 2
je 0x4db5a6
cmp dword [ebp - 0xcc], 0
jle 0x4db749
mov ebx, dword [ebp - 0xc8]
jmp 0x4db462
mov eax, dword [ebp - 0xd0]
or eax, dword [ebp - 0x118]
jne 0x4db772
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x14]
cmp eax, dword [ebp - 0xc4]
jne 0x4db772
cmp edx, dword [ebp - 0xd4]
jne 0x4db772
xor esi, esi
jmp 0x4db777
mov esi, 0x80004005
mov dword [ebp - 0xc0], esi
mov ebx, dword [ebp - 0xc8]
test ebx, ebx
jle 0x4db7cf
mov esi, dword [ebp - 0x10c]
lea edi, [ebp - 0xa4]
lea eax, [edi - 0x10]
cmp dword [eax + 0x1c], 1
jne 0x4db7b4
and dword [ebp - 0x110], 0
lea ecx, [ebp - 0x110]
push 1
push ecx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
cmp dword [edi], 0
je 0x4db7c1
push dword [edi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
add edi, 0x28
sub ebx, 1
jne 0x4db793
mov esi, dword [ebp - 0xc0]
mov eax, esi
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00573599
mov esp, ebp
pop ebp
ret 0x14