Function at 0x140028540
Capabilities:
Extract resource via kernel32 functions
Get common file path

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
mov qword [rsp + 8], rcx
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x50
mov rbp, rdx
xor ecx, ecx
mov edx, 0x228
mov r12d, r9d
mov esi, r8d
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov rdi, rax
test rax, rax
je 0x1400285c4
xor edx, edx
mov r8d, 0x124
mov rcx, rax
call sub.MSVCR100.dll_memset
mov rbx, qword [rsp + 0xa0]
test rbx, rbx
je 0x1400285f7
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_lstrlenA]
xor ecx, ecx
inc eax
movsxd rdx, eax
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov qword [rdi + 0x50], rax
test rax, rax
jne 0x1400285eb
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GlobalFree]
mov r13d, 2
mov eax, r13d
lea r11, [rsp + 0x50]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
mov rdx, rbx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_lstrcpyA]
xor r14d, r14d
mov eax, r12d
mov qword [rdi + 0x38], 0xffffffffffffffff
and eax, 0x3ffffff7
lea r13d, [r14 + 1]
dec eax
je 0x1400286de
dec eax
je 0x140028663
cmp eax, 2
jne 0x140028757
lea rsi, [rdi + 8]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [rsp + 0x30], 2
mov r9, rsi
mov r8, rbx
mov rdx, rbp
mov rcx, rax
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], r14d
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x1400286a8
mov qword [rsi], rbp
jmp 0x1400286ae
xor r9d, r9d
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], 0x80
lea r8d, [r9 + 3]
lea rsi, [rdi + 8]
mov edx, 0x80000000
mov rcx, rbp
mov dword [rsp + 0x20], r8d
test r12d, r12d
jns 0x140028695
call qword [sym.imp.KERNEL32.dll_CreateFileW]
jmp 0x14002869b
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rsi], rax
cmp rax, 0xffffffffffffffff
je 0x140028b44
mov dword [rdi], 2
mov rcx, qword [rsi]
mov r9d, r13d
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rdi + 0x14], eax
cmp eax, 0xffffffff
jne 0x140028757
mov rcx, rdi
mov r13d, reloc.WSOCK32.dll_recv
call fcn.140028460
jmp 0x1400285ca
mov qword [rdi + 8], rbp
test rbp, rbp
je 0x1400286ed
mov qword [rdi + 0x18], rsi
jmp 0x140028754
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
movzx edx, si
mov r8d, 0xa
mov rcx, rax
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov rsi, rax
test rax, rax
je 0x140028b3e
mov rdx, rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LoadResource]
test rax, rax
je 0x140028b3e
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov qword [rdi + 8], rax
test rax, rax
je 0x140028b2b
mov rdx, rsi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov r11d, eax
mov qword [rdi + 0x18], r11
mov dword [rdi], r13d
test r12b, 8
je 0x1400287a2
xor eax, eax
mov qword [rdi + 0x60], rax
mov qword [rdi + 0x68], rax
mov qword [rdi + 0x70], rax
mov qword [rdi + 0x78], rax
mov qword [rdi + 0x80], rax
mov word [rdi + 0x88], ax
or dword [rdi], 8
mov eax, 8
mov qword [rdi + 0x38], r14
mov word [rdi + 0x66], ax
mov eax, dword [rdi + 0x14]
mov dword [rdi + 0x86], eax
mov qword [rdi + 0x9a], rax
jmp 0x140028ad9
test byte [rdi], r13b
jne 0x1400287d2
mov rcx, qword [rdi + 8]
lea r8, [rsp + 0x40]
mov r9d, 2
mov rdx, r14
mov qword [rsp + 0x40], r14
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov r11d, dword [rdi + 0x14]
mov r14, qword [rsp + 0x40]
sub r14, r11
jmp 0x1400287da
mov r14, qword [rdi + 0x18]
mov qword [rdi + 0x20], r14
mov r15d, 0xffff
mov edx, 0x404
cmp r14, r15
cmovl r15, r14
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov rbx, rax
test rax, rax
je 0x140028b2b
mov r12d, 4
cmp r15, r12
jle 0x140028868
nop dword [rax + rax]
lea rcx, [r12 + 0x400]
mov rbp, r14
mov rax, r14
cmp rcx, r15
mov r12, rcx
cmovg r12, r15
sub rbp, r12
sub rax, rbp
cmp rax, 0x404
jbe 0x14002883d
mov esi, 0x404
jmp 0x140028842
mov esi, r14d
sub esi, ebp
test byte [rdi], r13b
jne 0x14002889c
mov edx, dword [rdi + 0x14]
mov rcx, qword [rdi + 8]
lea r8, [rsp + 0x40]
add rdx, rbp
xor r9d, r9d
mov qword [rsp + 0x40], rdx
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x1400288a0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GlobalFree]
test byte [rdi], r13b
jne 0x140028aa5
mov edx, dword [rdi + 0x14]
mov rcx, qword [rdi + 8]
lea r8, [rsp + 0x40]
xor r9d, r9d
mov qword [rsp + 0x40], rdx
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
xor r14d, r14d
jmp 0x140028aac
mov qword [rdi + 0x20], rbp
mov r8d, esi
mov rdx, rbx
mov rcx, rdi
call fcn.140026b10
test eax, eax
je 0x140028868
lea ecx, [rsi - 3]
movsxd rax, ecx
test ecx, ecx
js 0x1400288e5
nop dword [rax]
dec rax
dec ecx
cmp byte [rax + rbx], 0x50
jne 0x1400288e0
cmp byte [rax + rbx + 1], 0x4b
jne 0x1400288e0
cmp byte [rax + rbx + 2], 5
jne 0x1400288e0
cmp byte [rax + rbx + 3], 6
je 0x1400288f3
test rax, rax
jns 0x1400288c0
cmp r12, r15
jl 0x140028810
jmp 0x140028868
movsxd rax, ecx
cmp byte [rax + rbx - 0x14], 0x50
jne 0x140028919
cmp byte [rax + rbx - 0x13], 0x4b
jne 0x140028919
cmp byte [rax + rbx - 0x12], 6
jne 0x140028919
cmp byte [rax + rbx - 0x11], 7
jne 0x140028919
mov rbp, qword [rax + rbx - 0xc]
jmp 0x14002891f
add rbp, rax
xor r13b, r13b
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GlobalFree]
test byte [rdi], 1
jne 0x14002894c
mov edx, dword [rdi + 0x14]
mov rcx, qword [rdi + 8]
lea r8, [rsp + 0x40]
add rdx, rbp
xor r9d, r9d
mov qword [rsp + 0x40], rdx
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
jmp 0x140028950
mov qword [rdi + 0x20], rbp
mov rcx, rdi
call fcn.140026c90
mov rcx, rdi
test r13b, r13b
je 0x14002899a
call fcn.140026d70
mov rcx, rdi
mov r12, rax
call fcn.140026c90
mov rcx, rdi
call fcn.140026c90
mov rcx, rdi
mov ebx, eax
call fcn.140026c90
mov rcx, rdi
mov esi, eax
call fcn.140026d70
mov rcx, rdi
mov qword [rdi + 0x28], rax
call fcn.140026d70
jmp 0x1400289cb
call fcn.140026bc0
mov rcx, rdi
movzx ebx, ax
call fcn.140026bc0
mov rcx, rdi
movzx esi, ax
call fcn.140026bc0
mov rcx, rdi
movzx r11d, ax
mov qword [rdi + 0x28], r11
call fcn.140026bc0
xor r12d, r12d
movzx eax, ax
cmp dword [rdi + 0x10], 0
jne 0x140028abe
cmp rax, qword [rdi + 0x28]
jne 0x140028a92
test esi, esi
jne 0x140028a92
test ebx, ebx
jne 0x140028a92
mov rcx, rdi
test r13b, r13b
je 0x140028a41
call fcn.140026d70
mov rcx, rdi
mov rbx, rax
call fcn.140026d70
mov edx, dword [rdi + 0x14]
lea rcx, [rdx + rax]
mov qword [rdi + 0x48], rax
add rcx, rbx
test byte [rdi], 1
lea rax, [rcx + r12 + 0x34]
jne 0x140028a3b
mov rcx, qword [rdi + 8]
add rdx, rax
lea r8, [rsp + 0x40]
xor r9d, r9d
mov qword [rsp + 0x40], rdx
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
jmp 0x140028a57
mov qword [rdi + 0x20], rax
jmp 0x140028a57
call fcn.140026c90
mov rcx, rdi
mov ebx, eax
call fcn.140026c90
mov r11d, eax
mov qword [rdi + 0x48], r11
mov rcx, rdi
call fcn.140026bc0
cmp dword [rdi + 0x10], 0
movzx r11d, ax
mov dword [rdi + 0x30], r11d
jne 0x140028abe
mov r8d, dword [rdi + 0x14]
mov rax, qword [rdi + 0x48]
lea rdx, [rbp + r8]
lea rcx, [rbx + rax]
cmp rdx, rcx
jb 0x140028abe
sub r8d, eax
sub r8d, ebx
add r8d, ebp
mov dword [rdi + 0x34], r8d
jmp 0x140028aea
mov rcx, rdi
mov r13d, 8
call fcn.140028460
jmp 0x1400285ca
xor r14d, r14d
mov qword [rdi + 0x20], r14
mov rcx, rdi
call fcn.140026bc0
mov ecx, 0x8b1f
cmp ax, cx
je 0x140028ad1
mov rcx, rdi
mov r13d, 6
call fcn.140028460
jmp 0x1400285ca
mov qword [rdi + 0x48], 3
mov eax, dword [rdi + 0x14]
or dword [rdi], 4
mov dword [rdi + 0x10], r14d
mov dword [rdi + 0x34], eax
mov qword [rdi + 0x28], r13
lea rdx, [rdi + 0x120]
mov ecx, 0x103
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov r11d, eax
test eax, eax
je 0x140028b0e
cmp byte [r11 + rdi + 0x11f], 0x5c
je 0x140028b19
mov word [r11 + rdi + 0x120], WSAAsyncSelect
mov rax, qword [rsp + 0x80]
mov qword [rax], rdi
xor eax, eax
jmp 0x1400285cd
mov rcx, rdi
mov r13d, 2
call fcn.140028460
jmp 0x1400285ca
mov r13d, 4
mov rcx, rdi
call fcn.140028460
jmp 0x1400285ca