Function at 0x140041ff0
Capabilities:
Read file on windows

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x90]
sub rsp, 0x190
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov qword [rsp + 0x1e0], rbx
mov rax, qword [0x14007e020]
xor rax, rsp
mov qword [rbp + 0x80], rax
mov r15, r9
mov r12d, r8d
mov ebx, edx
mov rsi, rcx
xor edi, edi
mov dword [rsp + 0x20], edi
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x50], rdi
test edx, edx
js 0x1400423c1
call qword [sym.imp.MSVCR100.dll_rewind]
mov edx, edi
mov dword [rsp + 0x20], edx
lea r14d, [rdi + 1]
test ebx, ebx
je 0x1400420bc
lea edx, [rbx*4 + 8]
xor r8d, r8d
mov rcx, rsi
call qword [sym.imp.MSVCR100.dll_fseek]
mov r9, rsi
mov r8d, r14d
lea edx, [rdi + 4]
lea rcx, [rsp + 0x20]
call qword [sym.imp.MSVCR100.dll_fread]
mov r11d, dword [rsp + 0x20]
mov edx, r11d
and edx, 0xff0000
mov eax, r11d
shr eax, 0x10
or edx, eax
shr edx, 8
mov eax, r11d
and eax, 0xff00
shl r11d, 0x10
or eax, r11d
shl eax, 8
or edx, eax
mov dword [rsp + 0x20], edx
xor r8d, r8d
mov rcx, rsi
call qword [sym.imp.MSVCR100.dll_fseek]
mov r9, rsi
mov r8, r14
mov edx, 0xc
lea rcx, [rsp + 0x58]
call qword [sym.imp.MSVCR100.dll_fread]
movzx edi, word [rsp + 0x5c]
rol di, 8
mov eax, dword [rsp + 0x20]
lea r13d, [rax + 0xc]
movzx ebx, r14w
cmp r14w, di
ja 0x1400423c1
nop dword [rax]
movzx eax, bx
add eax, eax
lea edx, [r13 + rax*8 - 0x10]
xor r8d, r8d
mov rcx, rsi
call qword [sym.imp.MSVCR100.dll_fseek]
mov r9, rsi
mov r8, r14
mov edx, 0x10
lea rcx, [rsp + 0x48]
call qword [sym.imp.MSVCR100.dll_fread]
mov r11d, dword [rsp + 0x48]
mov ecx, r11d
and ecx, 0xff0000
mov eax, r11d
shr eax, 0x10
or ecx, eax
shr ecx, 8
mov eax, r11d
and eax, 0xff00
shl r11d, 0x10
or eax, r11d
shl eax, 8
or ecx, eax
cmp ecx, 0x6e616d65
je 0x14004216e
inc bx
cmp bx, di
jbe 0x140042100
jmp 0x1400423c1
cmp bx, di
ja 0x1400423c1
mov ecx, dword [rsp + 0x50]
mov ebx, ecx
and ebx, 0xff0000
mov eax, ecx
shr eax, 0x10
or ebx, eax
shr ebx, 8
mov eax, ecx
and eax, 0xff00
shl ecx, 0x10
or eax, ecx
shl eax, 8
or ebx, eax
xor r8d, r8d
mov edx, ebx
mov rcx, rsi
call qword [sym.imp.MSVCR100.dll_fseek]
mov r9, rsi
mov r8, r14
mov edx, 6
lea rcx, [rsp + 0x24]
call qword [sym.imp.MSVCR100.dll_fread]
movzx edi, word [rsp + 0x26]
rol di, 8
movzx eax, word [rsp + 0x28]
rol ax, 8
movzx r14d, ax
add r14d, ebx
lea r13d, [rbx + 6]
mov eax, 1
movzx ebx, ax
cmp ax, di
ja 0x1400423c1
movzx eax, bx
lea ecx, [rax + rax*2]
lea edx, [r13 + rcx*4 - 0xc]
xor r8d, r8d
mov rcx, rsi
call qword [sym.imp.MSVCR100.dll_fseek]
mov r9, rsi
mov edx, 0xc
lea r8d, [rdx - 0xb]
lea rcx, [rsp + 0x38]
call qword [sym.imp.MSVCR100.dll_fread]
movzx r11d, word [rsp + 0x38]
rol r11w, 8
cmp r11w, 3
jne 0x140042265
movzx eax, word [rsp + 0x3a]
rol ax, 8
cmp ax, 1
je 0x140042245
cmp ax, 4
jne 0x140042265
movzx eax, word [rsp + 0x3c]
rol ax, 8
movzx eax, ax
cmp eax, r12d
jne 0x140042265
movzx eax, word [rsp + 0x3e]
rol ax, 8
cmp ax, 1
je 0x140042270
inc bx
cmp bx, di
jmp 0x1400421ea
movzx r12d, word [rsp + 0x40]
rol r12w, 8
movzx eax, word [rsp + 0x42]
rol ax, 8
movzx edx, ax
add edx, r14d
xor r8d, r8d
mov rcx, rsi
call qword [sym.imp.MSVCR100.dll_fseek]
movzx r11d, word [rsp + 0x3a]
rol r11w, 8
cmp r11w, 4
je 0x14004233d
shr r12w, 1
movzx eax, r12w
inc eax
movsxd rcx, eax
mov eax, 2
mul rcx
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov rcx, rax
call qword [sym.imp.mfc100u.dll_new__]
mov r13, rax
xor eax, eax
movzx r14d, ax
cmp ax, r12w
jae 0x140042317
mov rdi, r13
movzx r14d, r12w
mov r12d, r14d
nop
mov rcx, rsi
call qword [sym.imp.MSVCR100.dll_getc]
mov ebx, eax
mov rcx, rsi
call qword [sym.imp.MSVCR100.dll_getc]
shl bx, 8
or ax, bx
mov word [rdi], ax
add rdi, 2
dec r12
jne 0x1400422f0
movzx eax, r14w
xor ecx, ecx
mov word [r13 + rax*2], cx
mov rdx, r13
mov rcx, r15
call qword [sym.imp.acdb19.dll_public:_class_AdXREFString_const____ptr64___cdecl_AdXREFString::operator_wchar_t_const____ptr64____ptr64]
mov rcx, r13
call qword [sym.imp.mfc100u.dll_delete__]
jmp 0x1400423bd
movzx eax, r12w
inc eax
movsxd rbx, eax
mov rcx, rbx
call qword [sym.imp.mfc100u.dll_new__]
mov rdi, rax
mov r8, rbx
xor edx, edx
mov rcx, rax
call sub.MSVCR100.dll_memset
movzx edx, r12w
mov r9, rsi
mov r8d, 1
mov rcx, rdi
call qword [sym.imp.MSVCR100.dll_fread]
lea r11, [rsp + 0x78]
mov qword [rsp + 0x70], r11
xor r8d, r8d
mov rdx, rdi
lea rcx, [rsp + 0x70]
call fcn.140044050
nop
mov rdx, qword [rsp + 0x70]
mov rcx, r15
call qword [sym.imp.acdb19.dll_public:_class_AdXREFString_const____ptr64___cdecl_AdXREFString::operator_wchar_t_const____ptr64____ptr64]
mov rcx, rdi
call qword [sym.imp.mfc100u.dll_delete__]
nop
lea rax, [rsp + 0x78]
mov rcx, qword [rsp + 0x70]
cmp rcx, rax
je 0x1400423bd
call qword [sym.imp.MSVCR100.dll_free]
mov al, 1
jmp 0x1400423c3
xor al, al
mov rcx, qword [rbp + 0x80]
xor rcx, rsp
call fcn.140049a80
mov rbx, qword [rsp + 0x1e0]
add rsp, 0x190
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret