Function at 0x495320
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, 0x58
movzx eax, word [r8 + 0x2c]
mov r12, qword [rsp + 0xc0]
mov qword [rsp + 0xa0], rcx
mov r14, rdx
mov r15, r8
mov qword [rsp + 0xb8], r9
and ax, 0x380
cmp ax, 0x180
je 0x495372
xor esi, esi
mov eax, esi
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rax, qword [r8 + 0xe8]
mov r13, qword [rax + 0xe0]
test r13, r13
je 0x49535d
mov rcx, qword [r8 + 0xf8]
mov rdx, r8
lea rbx, [r13 + 0x10]
mov rbp, rbx
mov rax, qword [rcx + 8]
mov rax, qword [rax + 0x370]
call qword [rax + 0x260]
mov edx, dword [r13]
mov edi, eax
mov rax, qword [r14 + 0x28]
mov rsi, qword [rsp + 0xa0]
mov dword [rsp + 0x48], edi
mov qword [rsp + 0x30], rdi
mov qword [rsp + 0x20], rax
lea rax, [rdx + rdx*2]
add rsi, 8
mov qword [rsp + 0x28], rsi
shl rax, 4
add rax, rbx
cmp rbx, rax
jae 0x49575e
mov qword [rsp + 0xc0], r12
mov r12, r14
mov r14, qword [rsp + 0xc0]
nop word [rax + rax]
cmp dword [rbp + 0x14], 4
je 0x4958b2
test byte [rbp + 0x23], 1
jne 0x495743
cmp qword [rbp], 0
je 0x495743
test byte [r15 + 0x2a], 0x10
mov rdx, qword [r14]
je 0x495432
test rdx, rdx
je 0x495aa0
mov eax, dword [rbp + 0x10]
lea rax, [rax + rax*2]
lea rax, [rdx + rax*8]
cmp rax, qword [r14 + 0x10]
mov qword [r14 + 8], rax
jae 0x495452
mov edx, dword [rbp + 0x18]
lea ecx, [rdx + 8]
cmp qword [rax], rcx
je 0x495469
lea rcx, str._builds_idf_crosstool_NG_.build_HOST_x86_64_w64_mingw32_xtensa_esp32s2_elf_src_binutils_bfd_elf_eh_frame.c
mov edx, 0x5eb
call fcn.0043f7d0
mov eax, dword [rbp + 0x18]
lea ecx, [rax + 8]
mov rdx, r14
call qword [rsp + 0xb8]
test eax, eax
sete al
movzx eax, al
test eax, eax
je 0x49573f
test byte [r12], 1
je 0x4954e0
movzx eax, byte [rbp + 0x20]
and eax, 0x70
jne 0x495980
test byte [rbp + 0x23], 8
jne 0x4954e0
mov rax, qword [rsp + 0x20]
mov dword [rax + 0x154], 0
test byte [r12 + 4], 6
je 0x4954e0
mov eax, dword [0x0054e5b0]
cmp eax, 9
jle 0x495b24
cmp eax, 0xa
jne 0x4954e0
lea rcx, str.further_warnings_about_FDE_encoding_preventing_.eh_frame_hdr_generation_dropped
call fcn.0043f6b0
add dword [0x0054e5b0], 1
nop dword [rax + rax]
and byte [rbp + 0x23], 0xfd
mov rax, qword [rsp + 0x20]
add dword [rax + 0x150], 1
mov rdi, qword [rbp]
movzx eax, byte [rdi + 0x23]
test al, 2
je 0x49573b
test byte [rdi + 0xa], 0x40
jne 0x495990
mov rsi, qword [rdi]
and eax, 0xfffffffd
mov qword [rdi], r15
mov byte [rdi + 0x23], al
test rsi, rsi
je 0x49573b
cmp byte [rsi + 0x50], 0xff
je 0x495b60
mov eax, dword [rsi + 0x40]
lea rcx, [rsi + 0x40]
mov qword [rsp + 0x38], rcx
mov rcx, qword [rsp + 0xa0]
lea rdx, [rax + rax*2]
mov rax, qword [r14]
mov qword [rsi + 0x40], 0
lea rax, [rax + rdx*8]
mov rdx, qword [rcx + 0xf8]
cmp byte [rdx + 4], 2
je 0x495b70
mov r8, qword [rax + 8]
shr r8, 8
mov eax, r8d
cmp rax, qword [r14 + 0x28]
jae 0x495589
shl rax, 5
add rax, qword [r14 + 0x18]
movzx edx, byte [rax + 0x14]
shr dl, 4
test dl, dl
je 0x4959ab
sub r8d, dword [r14 + 0x30]
mov rax, qword [r14 + 0x38]
mov rcx, qword [rax + r8*8]
movzx eax, byte [rcx + 0x18]
sub eax, 6
cmp al, 1
ja 0x4955af
mov rcx, qword [rcx + 0x28]
movzx eax, byte [rcx + 0x18]
sub eax, 6
cmp al, 1
jbe 0x4955a0
xor r8d, r8d
mov qword [rsi + 0x40], rcx
mov rdx, r12
call fcn.00483400
test eax, eax
jne 0x4959fd
xor r8d, r8d
mov edx, 4
mov rcx, rsi
call fcn.004c9160
lea rcx, [rsi + 8]
mov r8d, eax
mov edx, 1
call fcn.004c9160
lea r9, [rsi + 0xa]
mov dword [rsp + 0x4c], eax
mov rcx, r9
mov qword [rsp + 0x40], r9
call sub.msvcrt.dll_strlen
mov r9, qword [rsp + 0x40]
mov r8d, dword [rsp + 0x4c]
lea rdx, [rax + 1]
mov rcx, r9
call fcn.004c9160
lea rcx, [rsi + 0x20]
mov r8d, eax
mov edx, 8
call fcn.004c9160
lea rcx, [rsi + 0x28]
mov r8d, eax
mov edx, 8
call fcn.004c9160
lea rcx, [rsi + 0x30]
mov r8d, eax
mov edx, 8
call fcn.004c9160
lea rcx, [rsi + 0x38]
mov r8d, eax
mov edx, 8
call fcn.004c9160
mov rcx, qword [rsp + 0x38]
mov r8d, eax
mov edx, 8
call fcn.004c9160
mov r8d, eax
mov rax, qword [rsi + 0x48]
mov edx, 8
mov rcx, qword [rax]
add rcx, 0x70
call fcn.004c9160
lea rcx, [rsi + 0x50]
mov r8d, eax
mov edx, 1
call fcn.004c9160
lea rcx, [rsi + 0x51]
mov r8d, eax
mov edx, 1
call fcn.004c9160
lea rcx, [rsi + 0x52]
mov r8d, eax
mov edx, 1
call fcn.004c9160
lea rcx, [rsi + 0x53]
mov r8d, eax
mov edx, 1
call fcn.004c9160
movzx edx, byte [rsi + 0x53]
mov r8d, eax
lea rcx, [rsi + 0x55]
mov eax, 0x32
cmp rdx, 0x32
cmova rdx, rax
call fcn.004c9160
mov r8d, eax
mov dword [rsi + 4], eax
mov rax, qword [rsp + 0x20]
mov rcx, qword [rax + 0x148]
test rcx, rcx
je 0x495b80
mov r9d, 1
mov rdx, rsi
call fcn.004c8d40
test rax, rax
je 0x49573b
mov rcx, qword [rax]
test rcx, rcx
je 0x495be0
movzx eax, byte [rdi + 0xa]
or byte [rdi + 0x23], 2
or eax, 0x40
mov byte [rdi + 0xa], al
mov rdx, qword [rcx + 0x48]
test al, 2
mov qword [rdi], rdx
je 0x495738
or byte [rdx + 0xa], 2
mov rdi, rdx
mov qword [rbp], rdi
mov edx, dword [r13]
lea rax, [rdx + rdx*2]
add rbp, 0x30
shl rax, 4
add rax, rbx
cmp rbp, rax
jb 0x495400
mov r12, r14
mov rcx, qword [r13 + 8]
mov ebp, 1
mov r14d, 0xfffffff8
call sub.msvcrt.dll_free
mov eax, dword [r13]
xor r11d, r11d
mov qword [r13 + 8], 0
mov r10d, 4
mov r13d, 0xfffffffc
lea r9, [rax + rax*2]
xor eax, eax
shl r9, 4
add r9, rbx
cmp rbx, r9
jae 0x495b79
movzx edx, byte [rbx + 0x23]
test dl, 2
jne 0x49581d
mov ecx, dword [rbx + 0x14]
cmp ecx, 4
je 0x495924
test dl, 1
je 0x4958d5
movzx esi, byte [rbx + 0xa]
mov edi, esi
and edi, 0x10
cmp dil, 1
sbb r8d, r8d
and r8d, 4
sub r8d, 8
cmp dil, 1
sbb edi, edi
and edi, 0xfffffffc
lea eax, [rax + rdi + 7]
and eax, r8d
mov r8d, dword [rbx + 0x18]
mov dword [rbx + 0x1c], eax
cmp r8d, eax
jne 0x495973
mov eax, r8d
test dl, 1
je 0x495966
movzx esi, byte [rbx + 0xa]
shr dl, 2
and edx, 1
and esi, 0x20
je 0x495817
add edx, 1
add ecx, edx
add ecx, edx
add eax, ecx
add rbx, 0x30
cmp rbx, r9
jb 0x4957a3
add eax, 3
and r11d, 1
and eax, 0xfffffffc
mov rdx, qword [r15 + 0x40]
mov qword [r15 + 0x40], rax
cmp rdx, rax
mov qword [r15 + 0x48], rdx
jne 0x49584e
test r11b, r11b
je 0x49535d
mov rdi, qword [r12 + 0x28]
mov rbx, qword [r12 + 0x18]
xor esi, esi
mov rax, qword [r15 + 0xe8]
shl rdi, 5
add rdi, rbx
add rbx, 0x20
mov ebp, dword [rax + 0x88]
cmp rdi, rbx
ja 0x49588d
jmp 0x495b50
add rbx, 0x20
cmp rdi, rbx
jbe 0x495a50
cmp byte [rbx + 0x14], 1
ja 0x495880
cmp ebp, dword [rbx + 0x18]
jne 0x495880
mov rcx, qword [rbx]
mov rdx, r15
call fcn.00493580
test rax, rax
je 0x495880
add qword [rbx], rax
mov esi, 1
jmp 0x495880
cmp qword [r15 + 0x110], 0
setne al
lea edx, [rax + rax]
movzx eax, byte [rbp + 0x23]
and eax, 0xfffffffd
or eax, edx
mov byte [rbp + 0x23], al
mov edx, dword [r13]
jmp 0x495743
movzx r8d, byte [rbx + 0x20]
mov esi, r8d
and esi, 0x60
cmp sil, 0x60
je 0x495940
and r8d, 7
cmp r8b, 3
je 0x495940
cmp r8b, 4
je 0x4959a0
test r8b, r8b
je 0x495a80
mov r8d, dword [rbx + 0x18]
add eax, 3
and eax, 0xfffffffc
mov dword [rbx + 0x1c], eax
cmp eax, r8d
je 0x4957f9
mov r11d, 1
jmp 0x4957fc
add eax, 3
and eax, 0xfffffffc
cmp eax, dword [rbx + 0x18]
mov dword [rbx + 0x1c], eax
cmovne r11d, ebp
jmp 0x49581b
mov esi, r13d
mov r8d, 4
lea eax, [rax + r8 - 1]
mov r8d, dword [rbx + 0x18]
and eax, esi
cmp r8d, eax
mov dword [rbx + 0x1c], eax
je 0x4957f9
mov r11d, 1
shr dl, 2
and edx, 1
add ecx, edx
jmp 0x49581b
mov r11d, 1
jmp 0x495809
cmp al, 0x50
jne 0x4954e0
jmp 0x49549d
mov rdi, qword [rdi]
mov qword [rbp], rdi
jmp 0x49573f
mov esi, r14d
mov r8d, 8
jmp 0x495949
mov edx, dword [rax + 0x18]
mov rcx, qword [rsp + 0xa0]
mov dword [rsp + 0x40], r8d
call fcn.0046d780
test rax, rax
je 0x49573b
mov rdx, qword [rax + 0xd0]
test rdx, rdx
cmove rdx, rax
cmp qword [rdx + 0x70], 0
je 0x49573b
mov rax, qword [rsp + 0xa0]
mov byte [rsi + 9], 1
mov r8d, dword [rsp + 0x40]
mov eax, dword [rax + 0x3c]
mov dword [rsi + 0x44], r8d
mov dword [rsi + 0x40], eax
test byte [r12], 1
je 0x4955c6
test byte [rsi + 0x50], 0x70
jne 0x4955c6
mov rax, qword [rsp + 0xa0]
mov r8, r15
mov rdx, r12
mov rcx, qword [rsp + 0xa0]
mov rax, qword [rax + 8]
mov rax, qword [rax + 0x370]
call qword [rax + 0x268]
test eax, eax
je 0x4955c6
or byte [rdi + 0xa], 0xc
jmp 0x4955c6
test esi, esi
je 0x495b50
mov rax, qword [rsp + 0xa0]
mov rdx, qword [r12 + 0x18]
mov rax, qword [rax + 0xf8]
mov qword [rax + 0xa8], rdx
jmp 0x49535f
mov edi, dword [rsp + 0x48]
cmp edi, 4
mov r8d, edi
cmovb r8d, r10d
mov esi, r8d
neg esi
jmp 0x495949
movzx r9d, byte [rbp + 0x20]
mov eax, r9d
and eax, 0x60
cmp al, 0x60
je 0x495b1d
mov eax, r9d
and eax, 7
cmp al, 2
je 0x495bc0
jbe 0x495b0f
cmp al, 3
je 0x495bd0
cmp al, 4
mov edx, 8
mov r8d, 8
jne 0x495b1d
nop word cs:[rax + rax]
mov eax, dword [rbp + 0x18]
mov rcx, qword [rsp + 0x28]
shr r9b, 3
and r9d, 1
lea rdx, [rdx + rax + 8]
add rdx, qword [r15 + 0xb8]
call fcn.00493960
test rax, rax
setne al
movzx eax, al
jmp 0x49547b
test al, al
mov r8d, dword [rsp + 0x48]
mov rdx, qword [rsp + 0x30]
je 0x495ae0
xor edx, edx
xor r8d, r8d
jmp 0x495ae0
mov rdx, qword [rsp + 0xa0]
lea rcx, str.FDE_encoding_in__pB__pA__prevents_.eh_frame_hdr_table_being_created
mov r8, r15
call fcn.0043f6b0
add dword [0x0054e5b0], 1
jmp 0x4954e0
mov esi, 1
jmp 0x49535f
lea rax, [rsi + 0x40]
mov qword [rsp + 0x38], rax
jmp 0x4955c6
mov r8d, dword [rax + 0xc]
jmp 0x495569
xor eax, eax
jmp 0x495834
lea r9, [sub.msvcrt.dll_free]
lea r8, [0x00493830]
lea rdx, [0x00493320]
mov ecx, 1
call fcn.004c8a00
mov rcx, rax
mov rax, qword [rsp + 0x20]
test rcx, rcx
mov qword [rax + 0x148], rcx
je 0x49573b
mov r8d, dword [rsi + 4]
jmp 0x4956fc
mov edx, 2
mov r8d, 2
jmp 0x495ae0
mov edx, 4
mov r8d, 4
jmp 0x495ae0
mov ecx, 0x88
mov qword [rsp + 0x38], rax
call sub.msvcrt.dll_malloc
test rax, rax
je 0x49573b
mov rdx, qword [rsp + 0x38]
mov ecx, 0x11
mov rdi, rax
rep movsq qword [rdi], qword [rsi]
mov qword [rdx], rax
mov rdx, qword [rax + 0x48]
jmp 0x495738