Function at 0x4211b0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
mov eax, 0x2040
call fcn.0042be40
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x14], 0x42bb70
mov esi, ecx
mov edi, edx
lea eax, [ebp - 0x18]
mov ecx, dword fs:[0]
mov dword [ebp - 0x18], ecx
mov dword fs:[0], eax
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
test eax, eax
je 0x421203
mov ebx, eax
cmp eax, 0xffffffff
jne 0x421222
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x421208
mov eax, 6
mov byte [esi], 0
mov dword [esi + 4], eax
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
add esp, 0x2040
pop esi
pop edi
pop ebx
pop ebp
ret
lea eax, [ebp - 0x204c]
mov dword [ebp - 0x204c], 0
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x4212a2
mov dword [ebp - 0x20], ebx
movzx ebx, byte [edi + 6]
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x30], esi
cmp eax, ebx
mov ecx, ebx
cmovb ecx, eax
cmp ecx, 5
jae 0x42150b
lea esi, [edi + 2]
push ecx
push esi
push dword [ebp + 8]
mov dword [ebp - 0x24], ecx
call fcn.0042c9e0
add esp, 0xc
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x38], esi
cmp ebx, eax
jbe 0x42130c
mov ecx, dword [ebp - 0x24]
mov edx, 4
sub edx, ecx
add ecx, esi
push edx
push ecx
push esi
mov esi, eax
call fcn.0042c9e0
mov eax, esi
add esp, 0xc
movzx edx, byte [edi + 6]
mov ecx, dword [ebp - 0x24]
sub dl, cl
jmp 0x421311
lea eax, [ebp - 0x40]
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x40], 0x103
push 0
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
push eax
push 0
push 0
push 0
push ebx
call dword [sym.imp.ntdll.dll_NtReadFile]
cmp eax, 0x103
jne 0x4212de
push 0xffffffffffffffff
push ebx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebp - 0x40]
xor ecx, ecx
cmp eax, 0xc0000011
je 0x4212fd
cmp eax, 0x103
je 0x42151a
test eax, eax
js 0x42147a
mov ecx, dword [ebp - 0x3c]
mov al, 4
movzx eax, al
mov dword [esi + 4], ecx
mov dword [esi], eax
jmp 0x42120e
mov ecx, dword [ebp - 0x24]
xor edx, edx
mov esi, dword [ebp - 0x30]
cmp ebx, eax
mov byte [edi + 6], dl
jae 0x4213ad
mov edx, eax
sub edx, ecx
cmp edx, 4
jae 0x4213b8
mov dword [ebp - 0x4c], edx
mov edx, dword [ebp - 0x20]
lea ebx, [ebp - 0x2c]
mov word [ebp - 0x2c], 0
lea ecx, [ebp - 0x204c]
push edi
push 1
push 1
push ebx
call fcn.004215d0
add esp, 0x10
movzx eax, byte [ebp - 0x204c]
cmp al, 4
jne 0x421441
mov ecx, dword [ebp - 0x2048]
cmp ecx, 2
jae 0x421589
mov edx, dword [ebp - 0x38]
test ecx, ecx
je 0x42149c
push 0
push 0
push 4
push edx
push 1
push ebx
push 0x80
push 0xfde9
mov esi, edx
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edx, esi
test eax, eax
jne 0x42149e
mov esi, dword [ebp - 0x30]
mov ecx, 0x446528
mov al, 2
jmp 0x421470
mov dword [esi + 4], ecx
mov byte [esi], 4
jmp 0x42120e
mov ecx, 0xaaaaaaab
mov ebx, eax
mul ecx
mov eax, 0x1000
lea ecx, [ebp - 0x2c]
shr edx, 1
cmp edx, 0x1000
cmovb eax, edx
mov edx, dword [ebp - 0x20]
push edi
push eax
push 0x1000
lea edi, [ebp - 0x204c]
push edi
call fcn.004215d0
add esp, 0x10
movzx eax, byte [ebp - 0x2c]
cmp al, 4
jne 0x42145e
mov ecx, dword [ebp - 0x28]
cmp ecx, 0x1001
jae 0x421598
mov eax, dword [ebp + 8]
test ecx, ecx
je 0x4214fb
push 0
push 0
push ebx
push eax
push ecx
push edi
push 0x80
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x4214fd
mov dword [esi], 2
mov dword [esi + 4], 0x446528
jmp 0x42120e
movzx ecx, byte [ebp - 0x2049]
mov byte [esi + 3], cl
movzx ecx, word [ebp - 0x204b]
mov word [esi + 1], cx
mov ecx, dword [ebp - 0x2048]
jmp 0x421470
movzx ecx, byte [ebp - 0x29]
mov byte [esi + 3], cl
movzx ecx, word [ebp - 0x2b]
mov word [esi + 1], cx
mov ecx, dword [ebp - 0x28]
mov byte [esi], al
mov dword [esi + 4], ecx
jmp 0x42120e
push eax
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
mov ecx, eax
mov edi, eax
call fcn.0041d190
xor ecx, ecx
cmp al, 0xb
sete al
cmovne ecx, edi
shl al, 2
jmp 0x4212ff
xor eax, eax
mov ecx, dword [ebp + 8]
mov esi, dword [ebp - 0x4c]
movzx ebx, al
mov byte [edi + 6], al
mov dword [ebp - 0x20], ebx
add ecx, dword [ebp - 0x24]
cmp esi, ebx
cmovb ebx, esi
push ebx
push edx
push ecx
call fcn.0042c9e0
add esp, 0xc
cmp dword [ebp - 0x20], esi
jbe 0x4214e5
mov edx, dword [ebp - 0x38]
mov eax, 4
sub eax, ebx
lea ecx, [edx + ebx]
push eax
push ecx
push edx
call fcn.0042c9e0
add esp, 0xc
movzx eax, byte [edi + 6]
sub al, bl
jmp 0x4214e7
xor eax, eax
add ebx, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x30]
mov byte [edi + 6], al
mov dword [ecx + 4], ebx
mov byte [ecx], 4
jmp 0x42120e
xor eax, eax
add eax, dword [ebp - 0x24]
mov dword [esi + 4], eax
mov byte [esi], 4
jmp 0x42120e
mov edx, 4
push 0x4461f8
call fcn.0043ade0
lea eax, [ebp - 0x34]
mov dword [ebp - str.fatal_runtime_error:_I_O_error:_operation_failed_to_complete_synchronously_n], 0x446068
mov dword [ebp - 0x2048], 1
mov dword [ebp - 0x203c], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x20], ebx
mov byte [ebp - 0x44], 0
mov dword [ebp - 0x10], 0
lea ecx, [ebp - 0x2c]
lea edx, [ebp - 0x48]
mov dword [ebp - 0x2044], eax
lea eax, [ebp - 0x204c]
mov dword [ebp - 0x2040], 0
push eax
call fcn.0041a530
add esp, 4
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x28]
call fcn.0041a690
mov ecx, 7
int 0x29
ud2
mov edx, 1
push 0x446488
call fcn.0043ade0
mov edx, 0x1000
push 0x446478
call fcn.0043ade0
nop word [eax + eax]
push ebp
sub esp, 0x24
add ebp, 0xc
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 0x24
pop ebp
ret