Function at 0x180196880
Capabilities:
Extract resource via kernel32 functions
Get file size
Read file on windows

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x3b8]
sub rsp, 0x490
mov qword [rbp - 0x48], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x1802d1460]
xor rax, rsp
mov qword [rbp + 0x380], rax
mov dword [rsp + 0x70], r8d
mov rsi, rdx
mov qword [rbp - 0x60], rdx
mov r12, rcx
mov qword [rbp - 0x68], rcx
xor r13d, r13d
mov ebx, r13d
mov qword [rsp + 0x60], rbx
mov edi, r13d
lea r15d, [r13 + 2]
lea rdx, str.COLOR
test rsi, rsi
jne 0x180196b2d
lea rax, [rbp - 8]
mov qword [rbp - 0x10], rax
mov word [rbp - 8], r13w
lea r8d, [rsi - 1]
mov rdx, qword [0x1802e9610]
lea rcx, [rbp - 0x10]
call fcn.18016b370
nop
mov rdx, qword [0x1802e96a0]
cmp word [rdx], r13w
jne 0x1801969f9
test r12, r12
je 0x180196938
mov rdx, r12
lea rcx, [rbp - 0x10]
call fcn.18016b290
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 1]
mov rcx, qword [rbp - 0x10]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r14, rax
cmp rax, 0xffffffffffffffff
jne 0x180196987
lea rax, [rbp - 8]
mov rcx, qword [rbp - 0x10]
cmp rcx, rax
je 0x180196ba9
call fcn.1801cc408
jmp 0x180196ba9
xor edx, edx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
test eax, eax
je 0x18019696c
mov dword [rsp + 0x4c], r13d
mov ecx, edi
lea rdx, [0x1802ef15a]
call fcn.1801c83bc
mov rbx, rax
mov qword [rsp + 0x60], rax
test rax, rax
je 0x18019696c
mov qword [rsp + 0x20], r13
lea r9, [rsp + 0x4c]
mov r8d, edi
mov rdx, rax
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [rsp + 0x4c], edi
je 0x180196ad8
mov rcx, rbx
call fcn.1801c74d4
mov rbx, r13
mov qword [rsp + 0x60], rbx
jmp 0x18019696c
lea rcx, [rbp - 0x10]
call fcn.18016b290
cmp byte [reloc.WS2_32.dll_accept], 0
je 0x180196a14
mov r14, qword [0x1802f0d60]
jmp 0x180196a25
mov r8d, r15d
xor edx, edx
mov rcx, qword [rbp - 0x10]
call fcn.1801958a0
mov r14, rax
test r14, r14
je 0x18019696c
lea rax, [rbp + 0x150]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x5c]
mov rdx, r12
mov rcx, r14
call fcn.180195ae0
test eax, eax
jne 0x18019696c
mov edi, dword [rbp + 0x37c]
test edi, edi
je 0x18019696c
mov ecx, edi
lea rdx, [0x1802ef15a]
call fcn.1801c83bc
mov rbx, rax
mov qword [rsp + 0x60], rax
test rax, rax
je 0x18019696c
mov r9d, edi
mov r8, rax
mov edx, dword [rsp + 0x5c]
mov rcx, r14
call fcn.180195c70
test eax, eax
je 0x180196ac6
cmp eax, 0x600
je 0x180196ac6
mov rcx, rbx
call fcn.1801c74d4
mov rbx, r13
mov qword [rsp + 0x60], rbx
cmp byte [reloc.WS2_32.dll_accept], r13b
jne 0x18019696c
mov rcx, r14
call fcn.180195dd0
jmp 0x18019696c
cmp byte [reloc.WS2_32.dll_accept], 0
jne 0x180196ad8
mov rcx, r14
call fcn.180195dd0
nop
lea rax, [rbp - 8]
mov rcx, qword [rbp - 0x10]
cmp rcx, rax
je 0x180196aea
call fcn.1801cc408
lea rdx, str.COLOR
mov r12d, 1
mov dword [rsp + 0x44], r12d
mov r14d, r12d
mov dword [rsp + 0x48], r12d
test rsi, rsi
je 0x180196ccc
xor ecx, ecx
nop
movzx eax, word [rsi + rcx*2]
inc rcx
cmp ax, word [rdx + rcx*2 - 2]
jne 0x180196ccc
cmp rcx, 8
jne 0x180196b10
jmp 0x180196ea7
mov rcx, r13
movzx eax, word [rsi + rcx*2]
inc rcx
cmp ax, word [rdx + rcx*2 - 2]
jne 0x180196b50
cmp rcx, 8
jne 0x180196b30
mov ebx, 1
mov qword [rsp + 0x60], rbx
jmp 0x180196af1
mov rcx, qword [0x1802f0d68]
test rcx, rcx
cmove rcx, qword [0x1802f0d58]
mov r8, rsi
mov rdx, r12
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov r14, rax
test rax, rax
je 0x180196ba9
mov rcx, qword [0x1802f0d68]
test rcx, rcx
cmove rcx, qword [0x1802f0d58]
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov r13, rax
test rax, rax
jne 0x180196c50
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_FreeResource]
xor r13d, r13d
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 1]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r14, rax
cmp rax, 0xffffffffffffffff
je 0x180196cbc
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
test eax, eax
je 0x180196cbc
mov dword [rsp + 0x5c], r13d
mov ecx, edi
lea rdx, [0x1802ef15a]
call fcn.1801c83bc
mov rbx, rax
mov qword [rsp + 0x60], rax
test rax, rax
je 0x180196cc5
mov qword [rsp + 0x20], r13
lea r9, [rsp + 0x5c]
mov r8d, edi
mov rdx, rax
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [rsp + 0x5c], edi
je 0x180196cbc
mov rcx, rbx
call fcn.1801c74d4
xor eax, eax
jmp 0x18019716d
mov rcx, qword [0x1802f0d68]
test rcx, rcx
cmove rcx, qword [0x1802f0d58]
mov rdx, r14
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
test eax, eax
je 0x180196ba6
lea rdx, [0x1802ef15a]
mov ecx, edi
call fcn.1801c83bc
mov rbx, rax
mov qword [rsp + 0x60], rax
test rax, rax
je 0x180196ba6
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_LockResource]
mov rdx, rax
mov r8d, edi
mov rcx, rbx
call fcn.1801c9a10
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_FreeResource]
xor r13d, r13d
jmp 0x180196aea
test rbx, rbx
jne 0x180196aea
xor eax, eax
jmp 0x18019716d
mov qword [rbp + 0x90], 0
mov dword [rbp + 0xb0], 0
mov qword [rbp + 0x148], rbx
mov qword [rbp + 0x138], rbx
movsxd rax, edi
add rax, rbx
mov qword [rbp + 0x140], rax
lea r9, [rsp + 0x78]
lea r8, [rsp + 0x48]
lea rdx, [rsp + 0x44]
lea rcx, [rbp + 0x80]
call fcn.1801a5a30
mov r13, rax
mov qword [rsp + 0x68], rax
mov r14d, dword [rsp + 0x48]
cmp dword [0x1802f0da8], 0
je 0x180196e91
test rax, rax
je 0x180196e91
mov edx, r14d
sar edx, 1
test edx, edx
jle 0x180196e91
mov r8d, dword [rsp + 0x44]
lea eax, [r8*4]
cdqe
mov qword [rsp + 0x78], rax
mov eax, r8d
neg eax
shl eax, 2
cdqe
mov qword [rbp - 0x78], rax
lea ecx, [r14*4 - 4]
imul ecx, r8d
movsxd r8, ecx
inc r8
movsxd rbx, ecx
add rbx, 2
mov r9, r8
sub r9, rbx
add r9, r13
mov qword [rbp - 0x50], r9
movsxd r11, ecx
sub r11, rbx
add r11, 3
mov qword [rbp - 0x80], r11
sub rbx, r8
movsxd rax, ecx
sub rax, r8
mov qword [rbp - 0x58], rax
mov eax, edx
mov qword [rbp - 0x70], rax
mov r13d, dword [rsp + 0x44]
mov rcx, qword [rsp + 0x78]
mov rdx, qword [rbp - 0x78]
nop
test r13d, r13d
jle 0x180196e6a
lea rcx, [r8 + rbx]
lea rdx, [rcx + r9]
mov rdi, r15
sub rdi, r8
mov r9, r15
sub r9, r8
mov r10, rcx
sub r10, r8
mov r14, r15
sub r14, r8
sub rcx, r8
lea r12, [rcx + r11]
mov rsi, r15
sub rsi, r8
mov r11d, r13d
mov r13, qword [rbp - 0x58]
nop dword [rax]
movzx ecx, byte [rdx + rsi - 2]
movzx eax, byte [rdx + r13]
mov byte [rdx + rsi - 2], al
mov byte [rdx + r13], cl
movzx ecx, byte [rdx + rdi - 1]
movzx eax, byte [rdx]
mov byte [rdx + rdi - 1], al
mov byte [rdx], cl
movzx ecx, byte [r9 + rdx]
movzx eax, byte [rdx + r10]
mov byte [r9 + rdx], al
mov byte [rdx + r10], cl
movzx ecx, byte [rdx + r14 + 1]
movzx eax, byte [rdx + r12]
mov byte [rdx + r14 + 1], al
mov byte [rdx + r12], cl
lea rdx, [rdx + 4]
sub r11, 1
jne 0x180196e00
mov rax, qword [rbp - 0x70]
mov r13d, dword [rsp + 0x44]
mov rcx, qword [rsp + 0x78]
mov rdx, qword [rbp - 0x78]
mov r9, qword [rbp - 0x50]
mov r11, qword [rbp - 0x80]
add r15, rcx
add r8, rdx
sub rax, 1
mov qword [rbp - 0x70], rax
jne 0x180196dc0
mov rbx, qword [rsp + 0x60]
mov rsi, qword [rbp - 0x60]
mov r13, qword [rsp + 0x68]
mov r14d, dword [rsp + 0x48]
mov rcx, rbx
call fcn.1801c74d4
test r13, r13
je 0x180196cc5
mov r12d, dword [rsp + 0x44]
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x28], xmm0
xor edi, edi
mov dword [rbp - 0x18], edi
mov dword [rbp - 0x40], Ordinal_46
mov dword [rbp - 0x3c], r12d
mov eax, r14d
neg eax
mov dword [rbp - 0x38], eax
mov qword [rbp - 0x34], 0x200001
mov ebx, r14d
imul ebx, r12d
lea eax, [rbx*4]
mov dword [rbp - 0x2c], eax
xor r14b, r14b
mov byte [rsp + 0x40], r14b
mov qword [rsp + 0x50], rdi
mov dword [rsp + 0x28], edi
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x50]
xor r8d, r8d
lea rdx, [rbp - 0x40]
xor ecx, ecx
call qword [sym.imp.GDI32.dll_CreateDIBSection]
mov r15, rax
mov qword [rbp - 0x80], rax
test rax, rax
je 0x180196cc5
mov dword [rsp + 0x58], edi
test rsi, rsi
je 0x180196f97
mov ecx, edi
lea rdx, str.COLOR
nop dword [rax]
movzx eax, word [rsi + rcx*2]
inc rcx
cmp ax, word [rdx + rcx*2 - 2]
jne 0x180196f97
cmp rcx, 8
jne 0x180196f30
mov qword [rsp + 0x68], rdi
mov rax, qword [rbp - 0x68]
cmp word [rax], 0x23
jne 0x180196f5c
mov rcx, rax
call qword [sym.imp.USER32.dll_CharNextW]
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rsp + 0x68]
mov rcx, rax
call fcn.1801d8ec0
mov dword [rsp + 0x4c], eax
movzx ecx, byte [rsp + 0x4f]
mov byte [rsp + 0x5b], cl
mov byte [rsp + 0x5a], al
movzx eax, byte [rsp + 0x4d]
mov byte [rsp + 0x59], al
movzx eax, byte [rsp + 0x4e]
mov byte [rsp + 0x58], al
lea r13, [rsp + 0x58]
movsxd rdi, ebx
test ebx, ebx
jle 0x1801970d3
lea r8, [r13 + 3]
mov r14, 0xfffffffffffffffe
sub r14, r13
mov r15, r13
not r15
mov r12, 0xfffffffffffffffd
sub r12, r13
mov esi, dword [rsp + 0x70]
nop dword [rax]
nop dword [rax + rax]
mov r9, r8
sub r9, r13
movzx ecx, byte [r8]
mov rax, qword [rsp + 0x50]
mov byte [r9 + rax], cl
lea r10, [r12 + r8]
lea r11, [r14 + r8]
lea rbx, [r15 + r8]
cmp cl, 0xff
jae 0x180197057
movzx ecx, byte [r8 - 1]
movzx eax, byte [r8]
imul ecx, eax
mov eax, 0x80808081
mul ecx
shr edx, 7
mov rax, qword [rsp + 0x50]
mov byte [r10 + rax], dl
movzx ecx, byte [r8 - 2]
movzx eax, byte [r8]
imul ecx, eax
mov eax, 0x80808081
mul ecx
shr edx, 7
mov rax, qword [rsp + 0x50]
mov byte [r11 + rax], dl
movzx ecx, byte [r8 - 3]
movzx eax, byte [r8]
imul ecx, eax
mov eax, 0x80808081
mul ecx
shr edx, 7
mov rax, qword [rsp + 0x50]
mov byte [rbx + rax], dl
mov byte [rsp + 0x40], 1
jmp 0x180197080
movzx ecx, byte [r8 - 1]
mov rax, qword [rsp + 0x50]
mov byte [r10 + rax], cl
movzx ecx, byte [r8 - 2]
mov rax, qword [rsp + 0x50]
mov byte [r11 + rax], cl
movzx ecx, byte [r8 - 3]
mov rax, qword [rsp + 0x50]
mov byte [rbx + rax], cl
mov rax, qword [rsp + 0x50]
cmp dword [r10 + rax], esi
jne 0x1801970b2
mov byte [r10 + rax], 0
mov rax, qword [rsp + 0x50]
mov byte [r11 + rax], 0
mov rax, qword [rsp + 0x50]
mov byte [rbx + rax], 0
mov rax, qword [rsp + 0x50]
mov byte [r9 + rax], 0
mov byte [rsp + 0x40], 1
add r8, 4
sub rdi, 1
jne 0x180196fd0
mov rsi, qword [rbp - 0x60]
movzx r14d, byte [rsp + 0x40]
mov r12d, dword [rsp + 0x44]
mov r15, qword [rbp - 0x80]
xor ebx, ebx
test rsi, rsi
je 0x180197106
mov ecx, ebx
lea rdx, str.COLOR
nop dword [rax]
nop word [rax + rax]
movzx eax, word [rsi + rcx*2]
inc rcx
cmp ax, word [rdx + rcx*2 - 2]
jne 0x180197106
cmp rcx, 8
jne 0x1801970f0
jmp 0x18019710e
mov rcx, r13
call fcn.1801cc408
mov ecx, 0xb8
call fcn.1801c7c04
mov rdx, rax
mov qword [rsp + 0x68], rax
lea rcx, [rax + 0x30]
mov qword [rax + 0x28], rcx
mov word [rcx], bx
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], 0
mov word [rax + 0x20], 0
mov dword [rax + 0xb0], ebx
mov qword [rax], r15
mov rax, qword [rsp + 0x50]
mov qword [rdx + 8], rax
mov dword [rdx + 0x18], r12d
mov eax, dword [rsp + 0x48]
mov dword [rdx + 0x1c], eax
mov byte [rdx + 0x20], r14b
mov byte [rdx + 0x21], 0
mov qword [rdx + 0x10], rbx
mov rax, rdx
mov rcx, qword [rbp + 0x380]
xor rcx, rsp
call fcn.1801c74b0
lea r11, [rsp + 0x490]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret