Function at 0x40ad20
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xb8
movaps xmmword [rsp + 0xa0], xmm6
mov edx, 0x586ed80c
mov rdi, rcx
lea rcx, [0x00413ac0]
call fcn.00407a50
mov edx, 0x3008038c
mov rcx, rax
call fcn.004085b0
lea rcx, [section..rdata]
test rax, rax
je 0x40ad74
cmp qword [rax], 0
lea rdx, [rax + 0x10]
cmovne rcx, rdx
call qword [rdi + 0x10]
mov r9d, 0x18
mov rcx, 0xffffffffffffffff
mov qword [rsp + 0x80], 0
lea r8, [rsp + 0x80]
mov rdx, rax
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x88], 0
mov qword [rsp + 0x90], 0
call qword [rdi + 0x18]
mov edx, 0x427e1ae4
mov r14, qword [rsp + 0x80]
lea rcx, [0x00413a80]
call fcn.00407a50
mov edx, 0x289d9564
mov rcx, rax
call fcn.004085b0
test rax, rax
mov rbx, rax
je 0x40b1c3
cmp qword [rax], 0
je 0x40b093
lea rsi, [rax + 0x10]
mov rcx, rsi
call sub.msvcrt.dll_strlen
mov rdx, rax
mov rcx, rsi
call fcn.00409b20
mov edx, 3
lea rcx, [0x0041322c]
mov rsi, rax
call fcn.00409b20
mov rcx, rsi
mov rdx, rax
call qword [sym.imp.msvcrt.dll__wfopen]
test rax, rax
je 0x40b0a1
mov rcx, rax
call qword [sym.imp.msvcrt.dll__fileno]
mov ecx, eax
call qword [sym.imp.msvcrt.dll__get_osfhandle]
xor r9d, r9d
xor edx, edx
mov r8d, 0x1000002
cdqe
mov dword [rsp + 0x20], 0
mov qword [rsp + 0x58], rax
mov rcx, rax
mov qword [rsp + 0x28], 0
call qword [rdi + 0x20]
test rax, rax
mov qword [rsp + 0x48], rax
jne 0x40ae99
xor eax, eax
movaps xmm6, xmmword [rsp + 0xa0]
add rsp, 0xb8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
xor r9d, r9d
xor r8d, r8d
mov rcx, rax
mov qword [rsp + 0x20], 0
mov edx, 4
call qword [rdi + 0x28]
test rax, rax
mov qword [rsp + 0x38], rax
je 0x40ae7b
movsxd rsi, dword [r14 + 0x3c]
add rsi, r14
cmp word [rsi + 6], 0
je 0x40b05e
lea rax, [rsp + 0x70]
movdqa xmm6, xmmword [0x004160d0]
xor ebx, ebx
mov qword [rsp + 0x100], rdi
lea rcx, [rsp + 0x60]
mov rdi, rax
lea rbp, [rsi + 0x18]
mov qword [rsp + 0x40], rcx
lea r13, [rsp + 0x78]
nop dword [rax]
movzx r10d, word [rsi + 0x14]
lea eax, [rbx + rbx*4]
mov edx, 0x19
lea rcx, [0x00412020]
shl eax, 3
movzx eax, ax
add r10, rbp
lea r15, [r10 + rax]
call fcn.004081e0
lea rcx, [0x00413a60]
movups xmmword [rax], xmm6
movzx edx, byte [r15]
mov r12, rax
mov byte [rax + 0x10], dl
movzx edx, byte [r15 + 1]
mov byte [rax + 0x11], dl
movzx edx, byte [r15 + 2]
mov byte [rax + 0x12], dl
movzx edx, byte [r15 + 3]
mov byte [rax + 0x13], dl
movzx edx, byte [r15 + 4]
mov byte [rax + 0x14], dl
movzx edx, byte [r15 + 5]
mov byte [rax + 0x15], dl
movzx edx, byte [r15 + 6]
mov byte [rax + 0x16], dl
movzx edx, byte [r15 + 7]
mov byte [rax + 0x17], dl
mov edx, 0x108454ec
call fcn.00407a50
mov rcx, r12
mov rdx, rax
call fcn.00402b10
test rax, rax
js 0x40b049
movsxd rax, dword [r15 + 0xc]
mov r9d, 4
mov r8, r13
mov rdx, rdi
mov dword [rsp + 0x60], 0
mov rcx, 0xffffffffffffffff
mov dword [rsp + 0x64], 0
mov qword [rsp + 0x68], 0
add rax, r14
mov qword [rsp + 0x70], rax
movsxd rax, dword [r15 + 8]
mov qword [rsp + 0x78], rax
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x20], rax
call qword [0x0041a948]
test eax, eax
jne 0x40ae7b
movsxd rax, dword [r15 + 0xc]
lea rdx, [rsp + 0x68]
mov rcx, qword [rsp + 0x38]
mov qword [rsp + 0x20], rdx
mov r9, qword [rsp + 0x78]
mov rdx, qword [rsp + 0x70]
lea r8, [rcx + rax]
mov rcx, 0xffffffffffffffff
call qword [0x0041a940]
test eax, eax
jne 0x40ae7b
lea rax, [rsp + 0x64]
mov r9d, dword [rsp + 0x60]
mov r8, r13
mov rdx, rdi
mov qword [rsp + 0x20], rax
mov rcx, 0xffffffffffffffff
call qword [0x0041a948]
test eax, eax
jne 0x40ae7b
add ebx, 1
cmp word [rsi + 6], bx
ja 0x40af00
mov rdi, qword [rsp + 0x100]
mov rcx, 0xffffffffffffffff
call qword [0x0041a930]
mov rcx, qword [rsp + 0x58]
call qword [0x0041a930]
mov rcx, qword [rsp + 0x48]
call qword [0x0041a930]
mov rcx, qword [rsp + 0x50]
call qword [rdi + 0x30]
mov eax, 1
jmp 0x40ae7d
lea rsi, [section..rdata]
xor edx, edx
jmp 0x40ae06
lea rcx, [0x0041aa40]
call fcn.004077b0
mov rdi, rax
lea rax, [0x0041aa00]
mov qword [rdi], rax
lea rax, str.IOError
mov qword [rdi + 0x10], rax
mov rax, qword [rbx]
lea rbp, [rax + 0xd]
cmp rbp, 6
jg 0x40b265
lea rcx, [0x00412020]
mov edx, 0x18
call fcn.004081e0
mov rsi, rax
mov qword [rax + 8], 7
mov rdx, qword [0x00413a50]
mov qword [rsi], 0xd
lea rcx, [rsi + 0x1d]
mov qword [rsi + 0x10], rdx
mov edx, dword [0x00413a58]
mov dword [rsi + 0x18], edx
movzx edx, word [0x00413a5c]
mov word [rsi + 0x1c], dx
mov rax, qword [rbx]
lea rdx, [rbx + 0x10]
lea r8, [rax + 1]
call sub.msvcrt.dll_memcpy
mov rax, qword [rbx]
add rax, 0xd
mov qword [rsi], rax
add qword [rsi - 0x10], 8
mov rax, qword [rdi + 0x18]
test rax, rax
je 0x40b166
mov rbx, qword [rax - 0x10]
lea rdx, [rax - 0x10]
lea rcx, [rbx - 8]
cmp rcx, 7
mov qword [rax - 0x10], rcx
ja 0x40b166
lea rcx, [0x00428628]
call fcn.00405a50
mov rax, qword [rdi + 8]
mov qword [rdi + 0x18], rsi
test rax, rax
je 0x40b195
mov rbx, qword [rax - 0x10]
lea rdx, [rax - 0x10]
lea rcx, [rbx - 8]
cmp rcx, 7
mov qword [rax - 0x10], rcx
ja 0x40b195
lea rcx, [0x00428628]
call fcn.00405a50
mov qword [rdi + 8], 0
lea r9, str.io.nim
mov rcx, rdi
mov qword [rsp + 0x20], 0x2e9
lea r8, str.open
lea rdx, str.IOError
call fcn.0040a8c0
lea rcx, [section..rdata]
xor edx, edx
call fcn.00409b20
mov edx, 3
lea rcx, [0x0041322c]
mov rbx, rax
call fcn.00409b20
mov rcx, rbx
mov rdx, rax
call qword [sym.imp.msvcrt.dll__wfopen]
test rax, rax
jne 0x40ae37
lea rcx, [0x0041aa40]
call fcn.004077b0
mov edx, 0x1e
lea rcx, [0x00412020]
mov rdi, rax
lea rax, [0x0041aa00]
mov qword [rdi], rax
lea rax, str.IOError
mov qword [rdi + 0x10], rax
call fcn.004081e0
mov rdx, qword [0x00413a50]
mov rsi, rax
mov qword [rax + 8], 0xd
mov qword [rax], 0xd
mov qword [rax + 0x10], rdx
mov edx, dword [0x00413a58]
mov dword [rax + 0x18], edx
movzx edx, word [0x00413a5c]
mov word [rax + 0x1c], dx
jmp 0x40b136
lea rdx, [rax + 0x1e]
lea rcx, [0x00412020]
call fcn.004081e0
mov rsi, rax
mov qword [rax + 8], rbp
jmp 0x40b0f2