Function at 0x140039350
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov r11, rsp
push rsi
sub rsp, 0x150
mov rax, qword [rcx + 0xbd8]
mov rsi, rcx
test rax, rax
je 0x140039950
cmp word [rax], 0
je 0x140039950
mov rax, qword [str.AutoHotkey]
mov qword [r11 + 8], rbx
mov rbx, qword [0x140132b60]
mov qword [r11 - 0x18], r15
xor r15d, r15d
mov qword [rsp + 0x70], 0x50
mov qword [r11 - 0xa8], rax
lea rax, [0x140072040]
mov qword [r11 - 0xd8], r15
mov qword [r11 + 0x10], rbp
mov qword [r11 - 0xd0], rbx
mov qword [rsp + 0x78], rax
mov qword [r11 + 0x18], rdi
test rbx, rbx
je 0x14003953c
lea rax, [0x140136ecc]
cmp rax, 0x9f
je 0x14003953c
mov edx, 0x9f
mov r8d, ntohs
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindResourceW]
test rax, rax
je 0x14003953c
mov rdx, rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LoadResource]
test rax, rax
je 0x14003953c
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov rbp, rax
test rax, rax
je 0x14003953c
mov ecx, reloc.WSOCK32.dll_inet_ntoa
call qword [sym.imp.USER32.dll_GetSystemMetrics]
lea r9, [rbp + 6]
mov r8d, r15d
mov edi, eax
mov edx, r15d
movzx eax, word [rbp + 4]
cmp r15w, ax
jae 0x14003953c
mov qword [rsp + 0x178], r12
mov r11, r9
mov qword [rsp + 0x148], r14
mov r12d, 0x100
mov r10d, eax
nop word [rax + rax]
movzx eax, byte [r9]
mov r14d, edx
test eax, eax
mov rbp, r8
mov ecx, r15d
cmove eax, r12d
cmp eax, edx
jle 0x14003948e
cmp edx, edi
setl cl
jmp 0x140039493
cmp eax, edi
setge cl
test ecx, ecx
mov r8, r11
mov edx, eax
cmove r8, rbp
add r11, 0xe
add r9, 0xe
test ecx, ecx
cmove edx, r14d
sub r10, 1
jne 0x140039470
mov r14, qword [rsp + 0x148]
mov r12, qword [rsp + 0x178]
test r8, r8
je 0x14003953c
movzx edx, word [r8 + 0xc]
mov rcx, rbx
mov r8d, 3
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov rdi, rax
test rax, rax
je 0x14003953c
mov rdx, rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LoadResource]
test rax, rax
je 0x14003953c
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov rbp, rax
test rax, rax
je 0x14003953c
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [rsp + 0x30], r15d
mov r9d, 0x30000
mov edx, eax
mov dword [rsp + 0x28], r15d
mov r8d, 1
mov dword [rsp + 0x20], r15d
mov rcx, rbp
call qword [sym.imp.USER32.dll_CreateIconFromResourceEx]
test rax, rax
jne 0x14003954c
xor edx, edx
xor ecx, ecx
mov r8d, 0xffffff61
call qword [sym.imp.SHELL32.dll_ExtractIconW]
mov ecx, gethostbyname
mov qword [0x140132d28], rax
call qword [sym.imp.USER32.dll_GetSystemMetrics]
xor r9d, r9d
mov qword [rsp + 0x20], r15
mov r8d, eax
mov edx, 0xffffff61
xor ecx, ecx
call fcn.1400d8580
mov rcx, rax
mov qword [0x140132d30], rax
mov rax, qword [0x140132d28]
mov edx, 0x7f00
mov qword [rsp + 0xb8], rcx
xor ecx, ecx
mov qword [rsp + 0x90], rax
call qword [sym.imp.USER32.dll_LoadCursorW]
movdqa xmm0, xmmword [reloc.WSOCK32.dll_recv]
lea rcx, [rsp + 0x70]
movdqa xmmword [rsp + 0xa0], xmm0
mov qword [rsp + 0x98], rax
call qword [sym.imp.USER32.dll_RegisterClassExW]
mov word [0x140132d4c], ax
test ax, ax
je 0x140039937
lea rax, str.AutoHotkey2
mov qword [rsp + 0xa8], r15
lea rcx, [rsp + 0x70]
mov qword [rsp + 0xb0], rax
call qword [sym.imp.USER32.dll_RegisterClassExW]
mov word [0x140132d24], ax
test ax, ax
je 0x140039937
call qword [sym.imp.USER32.dll_GetForegroundWindow]
test rax, rax
je 0x14003964d
mov r8d, 0x40
lea rdx, [rsp + 0xc0]
mov rcx, rax
call qword [sym.imp.USER32.dll_GetClassNameW]
test eax, eax
je 0x140039648
lea rdx, str.Shell_TrayWnd
lea rcx, [rsp + 0xc0]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
je 0x14003964d
xor bpl, bpl
jmp 0x140039650
mov bpl, 1
mov rax, qword [0x140132b60]
mov r9d, 0xcf0000
mov r8, qword [rsi + 0xbd8]
mov rdx, qword [str.AutoHotkey]
mov qword [rsp + 0x58], r15
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x48], r15
mov qword [rsp + 0x40], r15
mov dword [rsp + 0x38], 0x80000000
movzx ecx, bpl
mov dword [rsp + 0x30], 0x80000000
mov dword [rsp + 0x28], 0x80000000
shl ecx, 7
mov dword [rsp + 0x20], 0x80000000
call qword [sym.imp.USER32.dll_CreateWindowExW]
mov qword [0x140132ab0], rax
mov rcx, rax
test rax, rax
je 0x1400398f0
mov rax, qword [0x140132b60]
lea rdx, str.edit
mov qword [rsp + 0x58], r15
mov r9d, 0x50a00804
mov qword [rsp + 0x50], rax
xor r8d, r8d
mov qword [rsp + 0x48], 1
mov qword [rsp + 0x40], rcx
xor ecx, ecx
mov dword [rsp + 0x38], r15d
mov dword [rsp + 0x30], r15d
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], r15d
call qword [sym.imp.USER32.dll_CreateWindowExW]
mov qword [0x140132a70], rax
test rax, rax
je 0x1400398f0
mov rcx, rax
call qword [sym.imp.USER32.dll_GetDC]
cmp byte [0x140136e83], r15b
lea rbx, str.Lucida_Console
mov rdi, rax
mov edx, 0x5a
lea rax, str.Consolas
mov rcx, rdi
cmovne rbx, rax
call qword [sym.imp.GDI32.dll_GetDeviceCaps]
mov ecx, 0xa
mov r8d, 0x48
mov edx, eax
call qword [sym.imp.KERNEL32.dll_MulDiv]
mov qword [rsp + 0x68], rbx
xor r9d, r9d
mov dword [rsp + 0x60], r15d
neg eax
mov dword [rsp + 0x58], r15d
xor r8d, r8d
mov dword [rsp + 0x50], r15d
xor edx, edx
mov dword [rsp + 0x48], r15d
mov ecx, eax
mov dword [rsp + 0x40], r15d
mov dword [rsp + 0x38], r15d
mov dword [rsp + 0x30], r15d
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], r15d
call qword [sym.imp.GDI32.dll_CreateFontW]
mov rcx, qword [0x140132a70]
mov rdx, rdi
mov qword [0x140133a70], rax
call qword [sym.imp.USER32.dll_ReleaseDC]
mov r8, qword [0x140133a70]
xor r9d, r9d
mov rcx, qword [0x140132a70]
mov edx, gethostbyname
call qword [sym.imp.USER32.dll_SendMessageW]
mov rcx, qword [0x140132a70]
xor r9d, r9d
xor r8d, r8d
mov edx, 0xc5
call qword [sym.imp.USER32.dll_SendMessageW]
mov rcx, qword [0x140132ab0]
xor edx, edx
call qword [sym.imp.USER32.dll_ShowWindow]
mov rcx, qword [0x140132ab0]
xor edx, edx
call qword [sym.imp.USER32.dll_ShowWindow]
test bpl, bpl
je 0x140039839
mov rcx, qword [0x140132ab0]
mov edx, 6
call qword [sym.imp.USER32.dll_ShowWindow]
mov rcx, qword [0x140132ab0]
xor r8d, r8d
mov edx, 0xffffffec
call qword [sym.imp.USER32.dll_SetWindowLongW]
mov rcx, qword [0x140132b60]
mov edx, 0xd4
call qword [sym.imp.USER32.dll_LoadAcceleratorsW]
cmp byte [0x140132aed], r15b
mov qword [0x140132a68], rax
je 0x140039864
mov qword [rsi + 0x2a0], r15
jmp 0x14003986c
mov rcx, rsi
call fcn.140039960
cmp qword [rsi + 0xb58], r15
je 0x1400398e9
cmp byte [0x140138675], 1
je 0x1400398e9
mov rax, qword [0x140136ec0]
test rax, rax
je 0x1400398ce
cmp qword [0x140136eb8], r15
je 0x1400398ce
mov rcx, qword [0x140132ab0]
call rax
cmp byte [rsi + 0xbe0], r15b
jne 0x1400398e2
mov rcx, qword [0x140132ab0]
xor r9d, r9d
mov edx, 0x415
mov r8d, 1
call qword [sym.imp.USER32.dll_PostMessageW]
mov eax, 1
mov byte [0x140138675], 1
jmp 0x14003990e
mov rcx, qword [0x140132ab0]
call qword [sym.imp.USER32.dll_SetClipboardViewer]
mov qword [rsi + 0xb68], rax
mov byte [0x140138675], 1
mov eax, 1
jmp 0x14003990e
mov qword [rsp + 0x20], r15
lea rcx, str.CreateWindow
xorps xmm3, xmm3
xor r8d, r8d
mov edx, 0x10000
call fcn.1400def40
xor eax, eax
mov rdi, qword [rsp + 0x170]
mov rbp, qword [rsp + 0x168]
mov rbx, qword [rsp + 0x160]
mov r15, qword [rsp + 0x140]
add rsp, 0x150
pop rsi
ret
mov qword [rsp + 0x20], r15
lea rcx, str.RegClass
xorps xmm3, xmm3
xor r8d, r8d
mov edx, 0x10000
jmp 0x140039907
xor eax, eax
add rsp, 0x150
pop rsi
ret