Function at 0x40d170
Capabilities:
Contain obfuscated stackstrings
Parse pe header

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x68
movabs rax, 0xffffffff0000ffff
test qword [rdx], rax
mov r12, rcx
mov rdi, rdx
mov rbx, r8
jne 0x40d4e2
lea rbp, [rbx + 0x10]
xor esi, esi
mov edx, dword [rdi + 0xc]
mov r13d, esi
cmp edx, 8
jg 0x40d200
test edx, edx
jle 0x40d1db
cmp sil, byte [rdi + 0x10]
mov r8d, esi
je 0x40d489
mov eax, 1
jmp 0x40d1d4
add rax, 1
cmp r8b, byte [rdi + rax + 0xf]
je 0x40d490
cmp edx, eax
movsxd rcx, eax
jg 0x40d1c5
add rsi, 1
cmp rsi, 0x100
jne 0x40d1a2
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rax, qword [rdi + 0x10]
movsxd rdx, esi
mov r15, qword [rax + rdx*8]
test r15, r15
je 0x40d1db
mov r14, qword [rbx + 8]
test r14, r14
jne 0x40d432
cmp rsi, 0x1f
mov byte [rsp + 0x40], 0x40
mov byte [rsp + 0x41], 0x41
mov byte [rsp + 0x42], 0x42
mov byte [rsp + 0x43], 0x43
mov byte [rsp + 0x44], 0x44
mov byte [rsp + 0x45], 0x45
mov byte [rsp + 0x46], 0x46
mov byte [rsp + 0x47], 0x47
mov byte [rsp + 0x48], 0x48
mov byte [rsp + 0x49], 0x49
mov byte [rsp + 0x4a], 0x4a
mov byte [rsp + 0x4b], 0x4b
mov byte [rsp + 0x4c], 0x4c
mov byte [rsp + 0x4d], 0x4d
mov byte [rsp + 0x4e], 0x4e
mov byte [rsp + 0x4f], 0x4f
mov byte [rsp + 0x50], 0x50
mov byte [rsp + 0x51], 0x51
mov byte [rsp + 0x52], 0x52
mov byte [rsp + 0x53], 0x53
mov byte [rsp + 0x54], 0x54
mov byte [rsp + 0x55], 0x55
mov byte [rsp + 0x56], 0x56
mov byte [rsp + 0x57], 0x57
mov byte [rsp + 0x58], 0x58
mov byte [rsp + 0x59], 0x59
mov byte [rsp + 0x5a], 0x5a
mov byte [rsp + 0x5b], 0x5b
mov byte [rsp + 0x5c], 0x5c
mov byte [rsp + 0x5d], 0x5d
mov byte [rsp + 0x5e], 0x5e
mov byte [rsp + 0x5f], 0x5f
jbe 0x40d362
cmp r13d, 0x7f
je 0x40d4a0
cmp rsi, 0x20
je 0x40d53d
mov rax, qword [rbx]
mov r13, qword [rbx + 8]
cmp rax, rbp
lea r10, [r13 + 1]
je 0x40d4c4
mov rdx, qword [rbx + 0x10]
cmp r10, rdx
jbe 0x40d31f
mov qword [rsp + 0x20], 1
xor r9d, r9d
xor r8d, r8d
mov rdx, r13
mov rcx, rbx
mov qword [rsp + 0x30], r10
call fcn.00499ee0
mov rax, qword [rbx]
mov r10, qword [rsp + 0x30]
mov byte [rax + r13], sil
mov rax, qword [rbx]
mov qword [rbx + 8], r10
mov byte [rax + r13 + 1], 0
mov r8, rbx
mov rdx, r15
mov rcx, r12
call fcn.0040d170
add rsi, 1
xor r8d, r8d
mov rdx, r14
mov rcx, rbx
call fcn.004992f0
cmp rsi, 0x100
jne 0x40d1a2
jmp 0x40d1e8
movzx r13d, byte [rsp + rsi + 0x40]
test r13b, r13b
je 0x40d2d1
mov rdx, qword [rbx]
mov rax, qword [rbx + 8]
cmp rdx, rbp
lea r10, [rax + 1]
je 0x40d4ba
mov rcx, qword [rbx + 0x10]
cmp r10, rcx
jbe 0x40d3bf
mov rdx, rax
mov qword [rsp + 0x20], 1
xor r9d, r9d
xor r8d, r8d
mov rcx, rbx
mov qword [rsp + 0x38], r10
mov qword [rsp + 0x30], rax
call fcn.00499ee0
mov rdx, qword [rbx]
mov r10, qword [rsp + 0x38]
mov rax, qword [rsp + 0x30]
mov byte [rdx + rax], 0x5e
mov rdx, qword [rbx]
mov qword [rbx + 8], r10
mov byte [rdx + rax + 1], 0
mov rdx, qword [rbx]
mov rax, qword [rbx + 8]
cmp rdx, rbp
lea r10, [rax + 1]
je 0x40d4ce
mov rcx, qword [rbx + 0x10]
cmp r10, rcx
jbe 0x40d41d
mov rdx, rax
mov qword [rsp + 0x20], 1
xor r9d, r9d
xor r8d, r8d
mov rcx, rbx
mov qword [rsp + 0x38], r10
mov qword [rsp + 0x30], rax
call fcn.00499ee0
mov rdx, qword [rbx]
mov r10, qword [rsp + 0x38]
mov rax, qword [rsp + 0x30]
mov byte [rdx + rax], r13b
mov rdx, qword [rbx]
mov qword [rbx + 8], r10
mov byte [rdx + rax + 1], 0
jmp 0x40d330
mov rax, qword [rbx]
lea r10, [r14 + 1]
cmp rax, rbp
je 0x40d4d8
mov rdx, qword [rbx + 0x10]
cmp r10, rdx
jbe 0x40d472
mov qword [rsp + 0x20], 1
xor r9d, r9d
xor r8d, r8d
mov rdx, r14
mov rcx, rbx
mov qword [rsp + 0x30], r10
call fcn.00499ee0
mov rax, qword [rbx]
mov r10, qword [rsp + 0x30]
mov byte [rax + r14], 0x20
mov rax, qword [rbx]
mov qword [rbx + 8], r10
mov byte [rax + r14 + 1], 0
jmp 0x40d21d
xor ecx, ecx
nop dword [rax + rax]
mov r15, qword [rdi + rcx*8 + 0x18]
jmp 0x40d20b
mov rdx, qword [rbx]
mov rax, qword [rbx + 8]
mov r13d, 0x3f
cmp rdx, rbp
lea r10, [rax + 1]
jne 0x40d385
mov ecx, 0xf
jmp 0x40d389
mov edx, 0xf
jmp 0x40d2f3
mov ecx, 0xf
jmp 0x40d3e7
mov edx, 0xf
jmp 0x40d446
lea rsi, [rsp + 0x40]
mov rcx, rsi
call fcn.0040c580
mov r8, qword [rsp + 0x40]
mov rdx, qword [rbx]
lea rcx, str._s_____s
call fcn.00413ac0
mov rcx, qword [rsp + 0x40]
add rsi, 0x10
cmp rcx, rsi
je 0x40d19c
call fcn.004aaf10
jmp 0x40d19c
lea rdx, [0x004b2a31]
mov rcx, rbx
call fcn.00498ca0
jmp 0x40d330