Function at 0x10031c7
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x2014
call fcn.01007810
mov eax, dword [0x1009410]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, ecx
mov dword [ebp - 0x2014], edi
mov eax, dword [0x1009008]
cmp eax, 0x1009008
je 0x1003215
test byte [eax + 0x1c], 1
je 0x1003215
push 0x1001704
push 0x5c
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01001e7b
mov eax, dword [edi + 0x134]
push 0xffffffffffffffff
mov dword [ebp - 0x2010], eax
xor edi, edi
push edi
lea eax, [ebp - 0x2010]
push eax
push 1
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
cmp eax, 0xffffffff
jne 0x100326e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [0x1009008]
cmp eax, 0x1009008
je 0x1003267
test byte [eax + 0x1c], 1
je 0x1003267
push esi
push 0x1001704
push 0x5d
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01001ea2
mov eax, esi
jmp 0x10034c6
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 2
jne 0x10033cd
push edi
lea eax, [ebp - 0x2008]
push eax
push 0x1000
lea eax, [ebp - 0x2004]
push eax
push 0xfffffffffffffff6
mov dword [ebp - 0x2008], edi
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_ReadConsoleW]
mov dword [ebp - 0x200c], eax
cmp eax, edi
jne 0x10032f6
mov eax, dword [0x1009008]
cmp eax, 0x1009008
je 0x1003433
test byte [eax + 0x1c], 1
je 0x1003433
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [0x1009008]
push 0x1001704
push 0x5e
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01001ea2
jmp 0x1003433
cmp dword [ebp - 0x2008], edi
jne 0x1003305
mov dword [esi], edi
jmp 0x10033c9
push edi
push edi
push edi
push edi
push dword [ebp - 0x2008]
lea eax, [ebp - 0x2004]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetConsoleCP]
push eax
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push eax
mov dword [esi], eax
call fcn.01001bb6
pop ecx
mov dword [ebx], eax
cmp eax, edi
jne 0x1003361
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [0x1009008]
cmp eax, 0x1009008
je 0x1003433
test byte [eax + 0x1c], 1
je 0x1003433
push 0x1001704
push 0x5f
jmp 0x1003401
push edi
push edi
push dword [esi]
push eax
push dword [ebp - 0x2008]
lea eax, [ebp - 0x2004]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetConsoleCP]
push eax
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [esi], eax
cmp eax, edi
jne 0x100342b
mov eax, dword [0x1009008]
cmp eax, 0x1009008
je 0x10033bb
test byte [eax + 0x1c], 1
je 0x10033bb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [0x1009008]
push 0x1001704
push 0x60
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01001ea2
push dword [ebx]
mov dword [ebp - 0x200c], edi
call fcn.01001bd1
pop ecx
mov dword [ebx], edi
jmp 0x100342b
push 0x1000
call fcn.01001bb6
pop ecx
mov dword [ebx], eax
cmp eax, edi
jne 0x100340e
push 0xe
mov dword [esi], edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [0x1009008]
cmp eax, 0x1009008
je 0x1003433
test byte [eax + 0x1c], 1
je 0x1003433
push 0x1001704
push 0x61
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01001e7b
jmp 0x1003433
push edi
push esi
push 0x1000
push eax
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 0x200c], eax
cmp dword [ebp - 0x200c], edi
jne 0x100349e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [0x1009008]
mov ebx, 0x1009008
cmp eax, ebx
je 0x1003462
test byte [eax + 0x1c], 1
je 0x1003462
push edi
push 0x1001704
push 0x62
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01001ea2
mov esi, dword [ebp - 0x2014]
mov ecx, esi
call fcn.01001c08
push dword [esi + 0x14]
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, dword [0x1009008]
cmp eax, ebx
je 0x100349a
test byte [eax + 0x1c], 1
je 0x100349a
push edi
push 0x1001704
push 0x63
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01001ea2
mov eax, edi
jmp 0x10034c6
mov eax, dword [0x1009008]
cmp eax, 0x1009008
je 0x10034c4
test byte [eax + 0x1c], 1
je 0x10034c4
push dword [esi]
push 0x1001704
push 0x64
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01001ea2
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.01007741
leave
ret 8