Function at 0x411078
Capabilities:
Read file on windows
Terminate process

Disassembly:
jmp 0x412728
push 0x1c
mov eax, 0x418f5c
call fcn.004114f6
mov esi, ecx
xor edi, edi
mov ecx, 0x42106b
mov dword [ebp - 4], edi
call fcn.004115a5
xor ebx, ebx
mov dword [esi], edi
inc ebx
mov dword [esi + 4], edi
push str..kmc_pre
lea ecx, [ebp + 8]
mov dword [esi + 8], edi
mov dword [esi + 0xc], edi
mov dword [esi + 0x10], edi
mov dword [esi + 0x14], edi
mov dword [esi + 0x18], edi
mov dword [esi + 0x1c], edi
mov dword [esi + 0x20], edi
mov dword [esi + 0x24], edi
mov byte [esi + 0x28], bl
mov dword [esi + 0x2c], edi
mov dword [esi + 0x30], edi
mov dword [esi + 0x34], edi
call fcn.004113f2
push 0x41bd68
lea ecx, [ebp + 8]
call fcn.004114ec
push eax
call dword [sym.imp.ucrtbased.dll_fopen]
mov edi, eax
pop ecx
pop ecx
test edi, edi
jne 0x4127cc
push 0x41bd6c
lea eax, [ebp + 8]
push eax
push str.Error:_Cannot_open_file
push dword [sym.imp.MSVCP140D.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.004112f8
pop ecx
pop ecx
push eax
call fcn.0041146f
pop ecx
pop ecx
push eax
call fcn.004112f8
pop ecx
pop ecx
push ebx
call dword [sym.imp.ucrtbased.dll_exit]
push edi
push 4
lea eax, [ebp - 0x14]
push ebx
push eax
call dword [sym.imp.ucrtbased.dll_fread]
add esp, 0x10
cmp eax, 4
je 0x4127f2
push 0x41bd6c
lea eax, [ebp + 8]
push eax
push str.Error_while_reading_start_marker_in
jmp 0x4127a8
push 4
lea eax, [ebp - 0x14]
push str.KMCP
push eax
call dword [sym.imp.ucrtbased.dll_strncmp]
add esp, 0xc
test eax, eax
je 0x41281a
push 0x41bd6c
lea eax, [ebp + 8]
push eax
push str.Error:_wrong_start_marker_in
jmp 0x4127a8
push 2
push 0xffffffffffffffff
push 0xfffffffffffffffc
push edi
call dword [sym.imp.ucrtbased.dll__fseeki64]
push edi
push 4
lea eax, [ebp - 0x14]
push ebx
push eax
call dword [sym.imp.ucrtbased.dll_fread]
add esp, 0x20
cmp eax, 4
je 0x412850
push 0x41bd6c
lea eax, [ebp + 8]
push eax
push str.Error_while_reading_end_marker_in
jmp 0x4127a8
push 4
lea eax, [ebp - 0x14]
push str.KMCP
push eax
call dword [sym.imp.ucrtbased.dll_strncmp]
add esp, 0xc
test eax, eax
je 0x41287b
push 0x41bd6c
lea eax, [ebp + 8]
push eax
push str.Error:_wrong_end_marker_in
jmp 0x4127a8
push 2
push 0
push 0
push edi
call dword [sym.imp.ucrtbased.dll__fseeki64]
push edi
call dword [sym.imp.ucrtbased.dll__ftelli64]
push 2
push 0xffffffffffffffff
push 0xfffffffffffffff8
push edi
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x28], edx
call dword [sym.imp.ucrtbased.dll__fseeki64]
add esp, 0x24
lea eax, [esi + 0x30]
mov ecx, esi
push eax
push edi
call fcn.00411299
push 2
push 0xffffffffffffffff
push 0xfffffffffffffff4
push edi
call dword [sym.imp.ucrtbased.dll__fseeki64]
add esp, 0x10
lea eax, [esi + 0x2c]
mov ecx, esi
push eax
push edi
call fcn.00411299
mov ecx, dword [esi + 0x30]
xor eax, eax
cmp dword [esi + 0x2c], 0x200
push 2
sete al
add ecx, 8
mov dword [esi + 0x38], eax
xor eax, eax
neg ecx
adc eax, eax
neg eax
push eax
push ecx
push edi
call dword [sym.imp.ucrtbased.dll__fseeki64]
add esp, 0x10
mov ecx, esi
push esi
push edi
call fcn.00411299
lea eax, [esi + 4]
mov ecx, esi
push eax
push edi
call fcn.00411299
lea eax, [esi + 8]
mov ecx, esi
push eax
push edi
call fcn.00411299
lea eax, [esi + 0xc]
mov ecx, esi
push eax
push edi
call fcn.00411299
cmp dword [esi + 0x38], ebx
jne 0x412936
lea eax, [esi + 0x10]
mov ecx, esi
push eax
push edi
call fcn.00411299
lea eax, [esi + 0x14]
mov ecx, esi
push eax
push edi
call fcn.00411299
lea eax, [ebp - 0x20]
mov ecx, esi
push eax
push edi
call fcn.00411299
lea eax, [esi + 0x20]
mov ecx, esi
push eax
push edi
call fcn.0041137a
lea eax, [ebp - 0x15]
mov ecx, esi
push eax
push edi
call fcn.004116ae
cmp byte [ebp - 0x15], 1
push ebx
setne al
push 3
push edi
mov byte [esi + 0x28], al
call dword [sym.imp.ucrtbased.dll_fseek]
add esp, 0xc
lea eax, [ebp - 0x1c]
mov ecx, esi
push eax
push edi
call fcn.00411299
mov ecx, dword [ebp - 0x1c]
xor eax, eax
add eax, dword [ebp - 0x20]
push edi
adc ecx, 0
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], ecx
call dword [sym.imp.ucrtbased.dll_fclose]
pop ecx
cmp dword [esi + 0x38], ebx
jne 0x4129f1
mov ecx, dword [esi + 0x10]
mov edi, dword [ebp - 0x28]
add ecx, ecx
shl ebx, cl
mov ecx, dword [esi + 0xc]
push 0
pop edx
lea eax, [ebx*4 + 4]
mov ebx, dword [ebp - 0x24]
sub ebx, eax
push 0
sbb edi, edx
sub ebx, dword [esi + 0x30]
sbb edi, edx
add ebx, 0xffffffec
adc edi, 0xffffffff
add ecx, ecx
add ecx, edx
xor eax, eax
bts edx, ecx
cmp ecx, 0x20
cmovae eax, edx
xor edx, eax
shl edx, 3
push edx
push edi
push ebx
call fcn.00411451
mov dword [esi + 0x34], eax
lea ecx, [ebp + 8]
call fcn.00411366
mov eax, esi
call fcn.004116a9
ret 0x1c