Function at 0x140058ec0
Capabilities:
Create process on windows
Extract resource via kernel32 functions

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x1f]
sub rsp, 0xa0
mov rax, qword [0x140185220]
xor rax, rsp
mov qword [rbp + 0x17], rax
mov r14, rdx
mov rdi, rcx
mov rsi, qword [rbp + 0x7f]
xor r12d, r12d
sub r8d, 2
je 0x140059239
sub r8d, 3
je 0x14005920e
sub r8d, 0x49
je 0x1400590ab
sub r8d, 0xc2
je 0x140058f59
cmp r8d, 1
jne 0x14005924d
movzx edx, r9w
mov ecx, edx
sub ecx, r8d
je 0x140058f37
cmp ecx, r8d
jne 0x14005924d
cmp byte [rdi + 0x30], r12b
je 0x140058f45
mov byte [rdi + 0x31], 1
mov qword [rdi + 0x38], rdx
mov rcx, qword [rdi + 0x10]
call qword [sym.imp.USER32.dll_EndDialog]
mov eax, 1
jmp 0x14005924f
mov r8d, dword [rcx + 0x80]
call fcn.14004b720
xorps xmm0, xmm0
movups xmmword [rbp - 0x19], xmm0
lea rdx, [rbp - 0x19]
mov rcx, qword [rdi + 0x10]
call qword [sym.imp.USER32.dll_GetClientRect]
mov rdx, qword [rdi + 8]
mov r8, qword [rdi + 0x10]
mov ecx, dword [rbp - 0xd]
sub ecx, dword [rbp - 0x15]
mov eax, dword [rbp - 0x11]
sub eax, dword [rbp - 0x19]
mov qword [rsp + 0x58], r12
mov qword [rsp + 0x50], rdx
mov qword [rsp + 0x48], r12
mov qword [rsp + 0x40], r8
mov dword [rsp + 0x38], ecx
mov dword [rsp + 0x30], eax
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], r12d
mov r9d, 0x50a0880c
lea r8, [0x140162d5c]
lea rdx, str.RICHEDIT50W
xor ecx, ecx
call qword [sym.imp.USER32.dll_CreateWindowExW]
mov qword [rdi + 0x50], rax
lea r8, [rdi + 0x60]
cmp qword [r8 + 0x18], 8
jb 0x140058fe2
mov r8, qword [r8]
movzx edx, word [rdi + 0x58]
mov rcx, qword [rdi + 8]
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov rbx, rax
test rax, rax
je 0x1400590a1
mov rdx, rax
mov rcx, qword [rdi + 8]
call qword [sym.imp.KERNEL32.dll_LoadResource]
test rax, rax
je 0x1400590a1
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov rsi, rax
mov rdx, rbx
mov rcx, qword [rdi + 8]
call qword [sym.imp.KERNEL32.dll_SizeofResource]
test eax, eax
je 0x1400590a1
mov dword [rbp - 0x1d], 0xfde9
mov dword [rbp - 0x21], 4
mov r9, rsi
lea r8, [rbp - 0x21]
mov edx, 0x461
mov rcx, qword [rdi + 0x50]
call qword [sym.imp.USER32.dll_SendMessageW]
mov rcx, qword [rdi + 0x50]
call qword [sym.imp.USER32.dll_SetFocus]
xor r9d, r9d
mov edx, 0xb1
lea r8, [r9 - 1]
mov rcx, qword [rdi + 0x50]
call qword [sym.imp.USER32.dll_SendMessageW]
xor r9d, r9d
mov edx, 0xcf
lea r8d, [r9 + 1]
mov rcx, qword [rdi + 0x50]
call qword [sym.imp.USER32.dll_SendMessageW]
mov r9d, 0x4000004
xor r8d, r8d
mov edx, 0x445
mov rcx, qword [rdi + 0x50]
call qword [sym.imp.USER32.dll_SendMessageW]
mov eax, 1
jmp 0x14005924f
test rsi, rsi
je 0x14005924d
mov rax, qword [rcx + 0x50]
cmp qword [rsi], rax
jne 0x14005924d
cmp dword [rsi + 0x10], 0x70b
jne 0x14005924d
mov eax, dword [rsi + 0x18]
cmp eax, 0x202
je 0x1400590e1
cmp eax, 0x20
jne 0x14005924d
mov eax, dword [rsi + 0x30]
sub eax, dword [rsi + 0x2c]
inc eax
movsxd rcx, eax
mov eax, 2
mul rcx
mov rbx, rax
mov rax, 0xffffffffffffffff
cmovo rbx, rax
mov rcx, rbx
call fcn.140114b30
mov r15, rax
mov r8, rbx
xor edx, edx
mov rcx, rax
call fcn.140118720
mov qword [rbp - 0x21], r15
mov rcx, qword [rsi + 0x2c]
mov qword [rbp - 0x19], rcx
mov qword [rbp - 0x11], r15
lea r9, [rbp - 0x19]
xor r8d, r8d
mov edx, 0x44b
mov rcx, qword [rdi + 0x50]
call qword [sym.imp.USER32.dll_SendMessageW]
mov eax, dword [rsi + 0x30]
sub eax, dword [rsi + 0x2c]
movsxd r8, eax
xorps xmm0, xmm0
movups xmmword [rbp - 9], xmm0
mov qword [rbp + 7], r12
mov qword [rbp + 0xf], r12
mov rdx, r15
lea rcx, [rbp - 9]
call fcn.14004c390
cmp qword [rbp + 7], 0
je 0x1400591b7
cmp dword [rsi + 0x18], 0x20
jne 0x140059189
mov edx, 0x7f89
xor ecx, ecx
call qword [sym.imp.USER32.dll_LoadCursorW]
mov rcx, rax
call qword [sym.imp.USER32.dll_SetCursor]
jmp 0x1400591b7
lea r8, [rbp - 9]
cmp qword [rbp + 0xf], 8
cmovae r8, qword [rbp - 9]
mov dword [rsp + 0x28], 0xa
mov qword [rsp + 0x20], r12
xor r9d, r9d
lea rdx, str.open
mov rcx, r14
call qword [sym.imp.SHELL32.dll_ShellExecuteW]
mov rdx, qword [rbp + 0xf]
cmp rdx, 8
jb 0x1400591f3
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 9]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400591ee
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14005926d
call fcn.14011460c
mov qword [rbp + 7], r12
mov qword [rbp + 0xf], 7
mov word [rbp - 9], r12w
mov rcx, r15
call fcn.14011460c
jmp 0x14005924d
mov rax, rsi
shr rax, 0x10
movzx edx, ax
movzx r9d, si
mov dword [rsp + 0x28], 1
mov dword [rsp + 0x20], edx
xor r8d, r8d
xor edx, edx
mov rcx, qword [rcx + 0x50]
call qword [sym.imp.USER32.dll_MoveWindow]
jmp 0x14005924d
mov rcx, qword [rcx + 0x50]
call qword [sym.imp.USER32.dll_CloseWindow]
mov rcx, qword [rdi + 0x50]
call qword [sym.imp.USER32.dll_DestroyWindow]
xor eax, eax
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.1401145b0
add rsp, 0xa0
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
call fcn.14011c9a4
nop
int3