joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1800041a0
Capabilities:
Initialize winhttp library
Prepare http request
Receive http response

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x40
xor edi, edi
lea rcx, str.intuitive
mov qword [r9], rdi
mov rbx, r9
mov qword [r9 + 8], rdi
xor r8d, r8d
mov qword [r9 + 0x10], rdi
xor edx, edx
mov qword [r9 + 0x18], rdi
xor r9d, r9d
mov dword [rsp + 0x20], edi
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov qword [rbx], rax
test rax, rax
jne 0x180004246
mov rcx, qword [rbx + 0x10]
test rcx, rcx
je 0x1800041f2
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov qword [rbx + 0x10], rdi
mov rcx, qword [rbx + 0x18]
test rcx, rcx
je 0x180004205
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov qword [rbx + 0x18], rdi
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x180004218
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov qword [rbx + 8], rdi
mov rcx, qword [rbx]
test rcx, rcx
je 0x180004229
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov qword [rbx], rdi
call qword [sym.imp.KERNEL32.dll_GetTickCount64]
mov qword [rbx + 0x20], rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor eax, eax
mov rbx, qword [rsp + 0x50]
add rsp, 0x40
pop rdi
ret
mov r8d, 0xdee3
lea rdx, str.127.0.0.1
xor r9d, r9d
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov qword [rbx + 8], rax
test rax, rax
je 0x1800041df
mov dword [rsp + 0x30], edi
lea r8, [0x18002c3bc]
mov qword [rsp + 0x28], rdi
lea rdx, [0x18002cab0]
xor r9d, r9d
mov qword [rsp + 0x20], rdi
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov qword [rbx + 0x10], rax
test rax, rax
je 0x1800041f2
xor r9d, r9d
xor r8d, r8d
mov edx, 0x72
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpSetOption]
mov rcx, qword [rbx + 0x10]
test eax, eax
je 0x1800041e3
mov qword [rsp + 0x30], rdi
xor r9d, r9d
mov dword [rsp + 0x28], edi
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x20], edi
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
mov rcx, qword [rbx + 0x10]
test eax, eax
je 0x1800041e3
xor edx, edx
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov rcx, qword [rbx + 0x10]
test eax, eax
je 0x1800041e3
xor edx, edx
call qword [sym.imp.WINHTTP.dll_WinHttpWebSocketCompleteUpgrade]
mov rcx, qword [rbx + 0x10]
mov qword [rbx + 0x18], rax
test rax, rax
je 0x1800041e3
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
lea rcx, str.Succesfully_upgraded_to_websocket_protocol_n
mov qword [rbx + 0x10], rdi
call fcn.180004340
mov rbx, qword [rsp + 0x50]
mov eax, 1
add rsp, 0x40
pop rdi
ret
Function at 0x180004500
Capabilities:
Allocate or change rwx memory

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x68
mov rax, qword [rsp + 0x78]
sub rax, 0x10000
mov rcx, rax
call fcn.180004750
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x70]
cmp qword [rsp + 0x20], rax
jbe 0x18000461a
mov rax, qword [section..data]
cmp qword [rsp + 0x20], rax
jb 0x180004564
mov rax, qword [0x180030008]
cmp qword [rsp + 0x20], rax
ja 0x180004564
mov rax, qword [rsp + 0x20]
sub rax, 0x8000000
mov qword [rsp + 0x20], rax
jmp 0x180004526
mov r8d, 0x30
xor edx, edx
lea rcx, [rsp + 0x30]
call fcn.180021cd0
mov r8d, 0x30
lea rdx, [rsp + 0x30]
mov rcx, qword [rsp + 0x20]
call sub.KERNEL32.dll_VirtualQuery
test rax, rax
jne 0x180004595
jmp 0x18000461a
cmp dword [rsp + 0x50], 0x10000
jne 0x1800045fd
cmp qword [rsp + 0x48], 0x10000
jb 0x1800045fd
mov r9d, 0x40
mov r8d, 0x3000
mov edx, 0x10000
mov rcx, qword [rsp + 0x20]
call sub.KERNEL32.dll_VirtualAlloc
mov qword [rsp + 0x28], rax
cmp qword [rsp + 0x28], 0
je 0x1800045db
mov rax, qword [rsp + 0x28]
jmp 0x18000461c
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x677
jne 0x1800045eb
xor eax, eax
jmp 0x18000461c
mov rax, qword [rsp + 0x20]
sub rax, 0x10000
mov qword [rsp + 0x20], rax
jmp 0x180004615
mov rax, qword [rsp + 0x38]
sub rax, 0x10000
mov rcx, rax
call fcn.180004750
mov qword [rsp + 0x20], rax
jmp 0x180004526
xor eax, eax
add rsp, 0x68
ret

Function at 0x180004630
Capabilities:
Allocate or change rwx memory

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x68
mov rcx, qword [rsp + 0x70]
call fcn.180004790
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x78]
cmp qword [rsp + 0x20], rax
jae 0x180004746
mov rax, qword [section..data]
cmp qword [rsp + 0x20], rax
jb 0x18000468b
mov rax, qword [0x180030008]
cmp qword [rsp + 0x20], rax
ja 0x18000468b
mov rax, qword [rsp + 0x20]
add rax, 0x8000000
mov qword [rsp + 0x20], rax
jmp 0x18000464d
mov r8d, 0x30
xor edx, edx
lea rcx, [rsp + 0x30]
call fcn.180021cd0
mov r8d, 0x30
lea rdx, [rsp + 0x30]
mov rcx, qword [rsp + 0x20]
call sub.KERNEL32.dll_VirtualQuery
test rax, rax
jne 0x1800046bc
jmp 0x180004746
cmp dword [rsp + 0x50], 0x10000
jne 0x180004724
cmp qword [rsp + 0x48], 0x10000
jb 0x180004724
mov r9d, 0x40
mov r8d, 0x3000
mov edx, 0x10000
mov rcx, qword [rsp + 0x20]
call sub.KERNEL32.dll_VirtualAlloc
mov qword [rsp + 0x28], rax
cmp qword [rsp + 0x28], 0
je 0x180004702
mov rax, qword [rsp + 0x28]
jmp 0x180004748
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x677
jne 0x180004712
xor eax, eax
jmp 0x180004748
mov rax, qword [rsp + 0x20]
add rax, 0x10000
mov qword [rsp + 0x20], rax
jmp 0x180004741
mov rax, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x30]
add rcx, rax
mov rax, rcx
mov rcx, rax
call fcn.180004790
mov qword [rsp + 0x20], rax
jmp 0x18000464d
xor eax, eax
add rsp, 0x68
ret
Function at 0x1800047e0
Capabilities:
Hook routines via microsoft detours

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x58
lea r8, [rsp + 0x30]
lea rdx, [rsp + 0x38]
mov rcx, qword [rsp + 0x60]
call fcn.180004d70
mov qword [rsp + 0x28], 0
cmp qword [0x180030b98], 0
jne 0x180004828
cmp qword [0x180030b90], 0
je 0x180004828
mov rax, qword [0x180030b90]
mov qword [0x180030b98], rax
cmp qword [0x180030b98], 0
je 0x1800048ce
mov rax, qword [0x180030b98]
cmp qword [rax + 0x10], 0
je 0x1800048ce
mov rax, qword [0x180030b98]
mov rcx, qword [rsp + 0x38]
cmp qword [rax + 0x10], rcx
jb 0x1800048ce
mov rax, qword [0x180030b98]
mov rcx, qword [rsp + 0x30]
cmp qword [rax + 0x10], rcx
ja 0x1800048ce
mov rax, qword [0x180030b98]
mov rax, qword [rax + 0x10]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x38]
cmp qword [rsp + 0x28], rax
jb 0x180004894
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x28], rax
jbe 0x18000489b
xor eax, eax
jmp 0x180004a45
mov rax, qword [0x180030b98]
mov rcx, qword [rsp + 0x28]
mov rcx, qword [rcx + 0x48]
mov qword [rax + 0x10], rcx
mov r8d, 0x60
mov edx, 0xcc
mov rcx, qword [rsp + 0x28]
call fcn.180021cd0
mov rax, qword [rsp + 0x28]
jmp 0x180004a45
mov rax, qword [0x180030b90]
mov qword [0x180030b98], rax
jmp 0x1800048f0
mov rax, qword [0x180030b98]
mov rax, qword [rax + 8]
mov qword [0x180030b98], rax
cmp qword [0x180030b98], 0
je 0x18000493d
cmp qword [0x180030b98], 0
je 0x18000493b
mov rax, qword [0x180030b98]
cmp qword [rax + 0x10], 0
je 0x18000493b
mov rax, qword [0x180030b98]
mov rcx, qword [rsp + 0x38]
cmp qword [rax + 0x10], rcx
jb 0x18000493b
mov rax, qword [0x180030b98]
mov rcx, qword [rsp + 0x30]
cmp qword [rax + 0x10], rcx
ja 0x18000493b
jmp 0x18000486c
jmp 0x1800048de
mov rax, qword [rsp + 0x60]
and rax, 0xffff
mov eax, eax
mov rcx, qword [rsp + 0x60]
sub rcx, rax
mov rax, rcx
mov qword [rsp + 0x60], rax
mov r8, qword [rsp + 0x30]
mov rdx, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x60]
call fcn.180004a50
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0
je 0x180004a43
mov rax, qword [rsp + 0x48]
mov qword [0x180030b98], rax
mov rax, qword [0x180030b98]
mov dword [rax], 0x52727464
mov rax, qword [0x180030b98]
mov qword [rax + 0x10], 0
mov rax, qword [0x180030b98]
mov rcx, qword [0x180030b90]
mov qword [rax + 8], rcx
mov rax, qword [0x180030b98]
mov qword [0x180030b90], rax
mov qword [rsp + 0x40], 0
mov rax, qword [0x180030b98]
add rax, 0x60
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0x2a8
jmp 0x1800049f4
mov eax, dword [rsp + 0x20]
dec eax
mov dword [rsp + 0x20], eax
cmp dword [rsp + 0x20], 1
jle 0x180004a2e
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x60
mov rcx, qword [rsp + 0x28]
mov rdx, qword [rsp + 0x40]
mov qword [rcx + rax + 0x48], rdx
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x60
mov rcx, qword [rsp + 0x28]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x40], rax
jmp 0x1800049ea
mov rax, qword [0x180030b98]
mov rcx, qword [rsp + 0x40]
mov qword [rax + 0x10], rcx
jmp 0x18000486c
xor eax, eax
add rsp, 0x58
ret
Function at 0x180005760
Capabilities:
Parse pe header

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x78
mov r8d, 0x30
lea rdx, [rsp + 0x40]
mov rcx, qword [rsp + 0x80]
call sub.KERNEL32.dll_VirtualQuery
nop
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x1800057a7
xor al, al
jmp 0x180005849
mov rax, qword [rsp + 0x28]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x28]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
cmp dword [rax], 0x4550
je 0x1800057d1
xor al, al
jmp 0x180005849
mov eax, 8
imul rax, rax, 0xc
mov rcx, qword [rsp + 0x30]
mov eax, dword [rcx + rax + 0x88]
mov rcx, qword [rsp + 0x28]
add rcx, rax
mov rax, rcx
cmp qword [rsp + 0x88], rax
jb 0x180005841
mov eax, 8
imul rax, rax, 0xc
mov rcx, qword [rsp + 0x30]
mov eax, dword [rcx + rax + 0x88]
mov rcx, qword [rsp + 0x28]
add rcx, rax
mov rax, rcx
mov ecx, 8
imul rcx, rcx, 0xc
mov rdx, qword [rsp + 0x30]
mov ecx, dword [rdx + rcx + 0x8c]
add rax, rcx
cmp qword [rsp + 0x88], rax
jae 0x180005841
mov al, 1
jmp 0x180005849
jmp 0x180005847
xor al, al
add rsp, 0x78
ret

Function at 0x180005b50
Capabilities:
Allocate or change rwx memory

Disassembly:
sub rsp, 0x38
mov rax, qword [0x180030b90]
mov qword [rsp + 0x28], rax
jmp 0x180005b70
mov rax, qword [rsp + 0x28]
mov rax, qword [rax + 8]
mov qword [rsp + 0x28], rax
cmp qword [rsp + 0x28], 0
je 0x180005b9f
lea r9, [rsp + 0x20]
mov r8d, 0x40
mov edx, 0x10000
mov rcx, qword [rsp + 0x28]
call sub.KERNEL32.dll_VirtualProtect
test eax, eax
jne 0x180005b9d
call sub.KERNEL32.dll_GetLastError
jmp 0x180005ba1
jmp 0x180005b62
xor eax, eax
add rsp, 0x38
ret
Function at 0x180006260
Capabilities:
Allocate or change rwx memory

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x68
mov dword [rsp + 0x20], 0
call sub.KERNEL32.dll_GetCurrentThreadId
cmp dword [0x180030ba8], eax
je 0x18000628d
mov eax, 0x10dd
jmp 0x1800064a6
cmp dword [0x180030bac], 0
je 0x1800062a1
mov eax, dword [0x180030bac]
jmp 0x1800064a6
cmp qword [rsp + 0x78], 0
jne 0x1800062b3
mov eax, 0x57
jmp 0x1800064a6
cmp qword [rsp + 0x70], 0
jne 0x1800062c5
mov eax, 6
jmp 0x1800064a6
mov rax, qword [rsp + 0x70]
cmp qword [rax], 0
jne 0x1800062f7
mov dword [rsp + 0x20], 6
mov eax, dword [rsp + 0x20]
mov dword [0x180030bac], eax
mov rax, qword [rsp + 0x70]
mov qword [0x180030bb0], rax
mov eax, dword [rsp + 0x20]
jmp 0x1800064a6
mov ecx, 0x30
call fcn.1800083e0
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x30], rax
cmp qword [rsp + 0x30], 0
jne 0x180006369
mov dword [rsp + 0x20], 8
mov eax, dword [rsp + 0x20]
mov dword [0x180030bac], eax
cmp qword [rsp + 0x30], 0
je 0x180006354
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x50], rax
mov edx, 0x30
mov rcx, qword [rsp + 0x50]
call fcn.18000841c
mov qword [rsp + 0x30], 0
mov rax, qword [rsp + 0x70]
mov qword [0x180030bb0], rax
mov eax, dword [rsp + 0x20]
jmp 0x1800064a6
xor edx, edx
mov rax, qword [rsp + 0x70]
mov rcx, qword [rax]
call fcn.180006230
mov qword [rsp + 0x38], rax
xor edx, edx
mov rcx, qword [rsp + 0x78]
call fcn.180006230
mov qword [rsp + 0x78], rax
mov rax, qword [rsp + 0x38]
movzx eax, byte [rax + 0x3e]
mov dword [rsp + 0x24], eax
movsxd rax, dword [rsp + 0x24]
mov rcx, qword [rsp + 0x38]
mov rcx, qword [rcx + 0x48]
sub rcx, rax
mov rax, rcx
mov qword [rsp + 0x40], rax
cmp dword [rsp + 0x24], 0
je 0x1800063c6
movsxd rax, dword [rsp + 0x24]
cmp rax, 0x1e
jbe 0x1800063e3
mov dword [rsp + 0x20], 9
cmp dword [0x180030ba0], 0
je 0x1800063de
jmp 0x18000632a
jmp 0x180006320
mov rax, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x78]
cmp qword [rax + 0x50], rcx
je 0x180006410
mov dword [rsp + 0x20], 9
cmp dword [0x180030ba0], 0
je 0x18000640b
jmp 0x18000632a
jmp 0x180006320
mov dword [rsp + 0x28], 0
movsxd rax, dword [rsp + 0x24]
lea r9, [rsp + 0x28]
mov r8d, 0x40
mov rdx, rax
mov rcx, qword [rsp + 0x40]
call sub.KERNEL32.dll_VirtualProtect
test eax, eax
jne 0x180006447
call sub.KERNEL32.dll_GetLastError
mov dword [rsp + 0x20], eax
jmp 0x180006320
mov rax, qword [rsp + 0x30]
mov dword [rax + 8], 1
mov rax, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x70]
mov qword [rax + 0x10], rcx
mov rax, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x38]
mov qword [rax + 0x20], rcx
mov rax, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x40]
mov qword [rax + 0x18], rcx
mov rax, qword [rsp + 0x30]
mov ecx, dword [rsp + 0x28]
mov dword [rax + 0x28], ecx
mov rax, qword [rsp + 0x30]
mov rcx, qword [0x180030bc0]
mov qword [rax], rcx
mov rax, qword [rsp + 0x30]
mov qword [0x180030bc0], rax
xor eax, eax
add rsp, 0x68
ret
Function at 0x1800064b0
Capabilities:
Resume thread

Disassembly:
sub rsp, 0x68
call sub.KERNEL32.dll_GetCurrentThreadId
cmp dword [0x180030ba8], eax
je 0x1800064cb
mov eax, 0x10dd
jmp 0x1800065f0
mov rax, qword [0x180030bc0]
mov qword [rsp + 0x28], rax
cmp qword [rsp + 0x28], 0
je 0x180006575
mov rax, qword [rsp + 0x28]
mov rax, qword [rax + 0x20]
movzx eax, byte [rax + 0x3e]
lea r9, [rsp + 0x20]
mov rcx, qword [rsp + 0x28]
mov r8d, dword [rcx + 0x28]
mov edx, eax
mov rax, qword [rsp + 0x28]
mov rcx, qword [rax + 0x18]
call sub.KERNEL32.dll_VirtualProtect
mov rax, qword [rsp + 0x28]
cmp dword [rax + 8], 0
jne 0x180006540
mov rax, qword [rsp + 0x28]
cmp qword [rax + 0x20], 0
je 0x180006540
mov rax, qword [rsp + 0x28]
mov rcx, qword [rax + 0x20]
call fcn.180004eb0
mov rax, qword [rsp + 0x28]
mov qword [rax + 0x20], 0
mov rax, qword [rsp + 0x28]
mov rax, qword [rax]
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x28]
mov qword [rsp + 0x38], rax
mov edx, 0x30
mov rcx, qword [rsp + 0x38]
call fcn.18000841c
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x28], rax
jmp 0x1800064d7
mov qword [0x180030bc0], 0
call fcn.180005910
mov rax, qword [0x180030bb8]
mov qword [rsp + 0x30], rax
cmp qword [rsp + 0x30], 0
je 0x1800065d9
mov rax, qword [rsp + 0x30]
mov rcx, qword [rax + 8]
call sub.KERNEL32.dll_ResumeThread
mov rax, qword [rsp + 0x30]
mov rax, qword [rax]
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x48], rax
mov edx, 0x10
mov rcx, qword [rsp + 0x48]
call fcn.18000841c
mov rax, qword [rsp + 0x50]
mov qword [rsp + 0x30], rax
jmp 0x180006591
mov qword [0x180030bb8], 0
mov dword [0x180030ba8], 0
xor eax, eax
add rsp, 0x68
ret
Function at 0x180006b20
Capabilities:
Suspend thread

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x48
cmp dword [0x180030bac], 0
je 0x180006b3d
mov eax, dword [0x180030bac]
jmp 0x180006c03
call sub.KERNEL32.dll_GetCurrentThread
cmp qword [rsp + 0x50], rax
jne 0x180006b50
xor eax, eax
jmp 0x180006c03
mov ecx, 0x10
call fcn.1800083e0
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x28], rax
cmp qword [rsp + 0x28], 0
jne 0x180006bbe
mov dword [rsp + 0x20], 8
cmp qword [rsp + 0x28], 0
je 0x180006ba3
mov rax, qword [rsp + 0x28]
mov qword [rsp + 0x38], rax
mov edx, 0x10
mov rcx, qword [rsp + 0x38]
call fcn.18000841c
mov qword [rsp + 0x28], 0
mov eax, dword [rsp + 0x20]
mov dword [0x180030bac], eax
mov qword [0x180030bb0], 0
mov eax, dword [rsp + 0x20]
jmp 0x180006c03
mov rcx, qword [rsp + 0x50]
call sub.KERNEL32.dll_SuspendThread
cmp eax, 0xffffffff
jne 0x180006bd8
call sub.KERNEL32.dll_GetLastError
mov dword [rsp + 0x20], eax
jmp 0x180006b79
mov rax, qword [rsp + 0x28]
mov rcx, qword [rsp + 0x50]
mov qword [rax + 8], rcx
mov rax, qword [rsp + 0x28]
mov rcx, qword [0x180030bb8]
mov qword [rax], rcx
mov rax, qword [rsp + 0x28]
mov qword [0x180030bb8], rax
xor eax, eax
add rsp, 0x48
ret

Function at 0x1800129b0
Capabilities:
Parse pe header

Disassembly:
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
push rbp
mov rbp, rsp
sub rsp, 0x50
mov qword [rbp - 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x60], rbx
mov ebx, ecx
test r8d, r8d
jne 0x180012a1f
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x180012a1f
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x180012a1f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x180012a1f
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x180012a1f
cmp dword [rcx + 0x84], 0xe
jbe 0x180012a1f
cmp dword [rcx + 0xf8], 0
je 0x180012a1f
mov ecx, ebx
call fcn.180012ad0
mov byte [rbp + 0x28], 0
lea rax, [rbp + 0x18]
mov qword [rbp - 0x18], rax
lea rax, [rbp + 0x20]
mov qword [rbp - 0x10], rax
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov eax, 2
mov dword [rbp - 0x2c], eax
mov dword [rbp - 0x28], eax
lea r9, [rbp - 0x2c]
lea r8, [rbp - 0x18]
lea rdx, [rbp - 0x28]
lea rcx, [rbp - 0x30]
call fcn.1800128ac
nop
cmp dword [rbp + 0x20], 0
je 0x180012a6d
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.180012a78
int3
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 1]
jmp 0x1800129b0
Function at 0x180016d74
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x180016d8a
mov al, 1
jmp 0x180016dea
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x180016d9b
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x180016de8
mov ecx, dword [rcx + 0x18]
nop
call fcn.18001d6a4
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x180016de8
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x180016de8
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x180016de8
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x180016dea
xor al, al
add rsp, 0x20
pop rbx
ret

Function at 0x180017eb0
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
movsxd r15, ecx
lea r9, [0x1800314e0]
mov rax, r15
mov rbp, r15
and eax, 0x3f
sar rbp, 6
mov ecx, 4
xor esi, esi
mov r14, rdx
lea rdi, [rax + rax*8]
mov rax, qword [r9 + rbp*8]
lea r13d, [rcx + 6]
mov r10, qword [rax + rdi*8 + 0x28]
test r8, r8
je 0x180017f07
cmp word [rdx], r13w
jne 0x180017f07
or byte [rax + rdi*8 + 0x38], cl
jmp 0x180017f0c
and byte [rax + rdi*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rbx, r14
cmp r14, r8
jae 0x180018031
mov r11d, 0xd
lea r12d, [r11 - 0xb]
movzx ecx, word [rdx]
cmp cx, 0x1a
je 0x180018052
lea r9, [rdx + 2]
cmp cx, r11w
je 0x180017f45
mov rdx, r9
mov word [rbx], cx
jmp 0x180017f6c
cmp r9, r8
jae 0x180017f7c
cmp word [r9], r13w
mov rax, r12
mov ecx, 4
cmove rax, rcx
add rdx, rax
mov eax, r13d
cmp word [r9], r13w
cmovne ax, r11w
mov word [rbx], ax
mov rax, r12
add rbx, rax
cmp rdx, r8
jb 0x180017f26
jmp 0x180018031
lea r9, [rsp + 0x80]
mov qword [rsp + 0x20], rsi
mov r8d, r12d
lea rdx, [rsp + 0x70]
mov rcx, r10
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x180018026
cmp dword [rsp + 0x80], esi
je 0x180018026
lea r8, [0x1800314e0]
mov rax, qword [r8 + rbp*8]
test byte [rax + rdi*8 + 0x38], 0x48
je 0x180017ffe
movzx eax, word [rsp + 0x70]
cmp ax, r13w
jne 0x180017fce
mov word [rbx], r13w
jmp 0x18001802e
mov ecx, 0xd
mov word [rsp + 0x78], ax
mov word [rbx], cx
mov rax, qword [r8 + rbp*8]
lea rcx, [rax + rdi*8]
mov al, byte [rsp + rsi + 0x78]
mov byte [rcx + rsi + 0x3a], al
inc rsi
cmp rsi, r12
jl 0x180017fdb
mov rax, qword [r8 + rbp*8]
mov byte [rax + rdi*8 + 0x3c], r13b
jmp 0x18001802e
cmp word [rsp + 0x70], r13w
jne 0x18001800b
cmp rbx, r14
je 0x180017fc8
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.18001d984
cmp word [rsp + 0x70], r13w
je 0x180018031
mov ecx, 0xd
mov word [rbx], cx
add rbx, r12
sub rbx, r14
sar rbx, 1
lea eax, [rbx + rbx]
mov rbx, qword [rsp + 0x88]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea r8, [0x1800314e0]
mov rdx, qword [r8 + rbp*8]
mov al, byte [rdx + rdi*8 + 0x38]
test al, 0x40
jne 0x18001802b
or al, r12b
mov byte [rdx + rdi*8 + 0x38], al
jmp 0x180018031
Function at 0x18001a6e8
Capabilities:
Query environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r14
sub rsp, 0x40
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor esi, esi
mov rbx, rax
test rax, rax
jne 0x18001a718
xor eax, eax
jmp 0x18001a7db
mov rbp, rbx
cmp word [rax], si
je 0x18001a73d
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x18001a724
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x18001a720
mov qword [rsp + 0x38], rsi
sub rbp, rbx
mov qword [rsp + 0x30], rsi
add rbp, 2
sar rbp, 1
mov r8, rbx
mov r9d, ebp
mov dword [rsp + 0x28], esi
xor edx, edx
mov qword [rsp + 0x20], rsi
xor ecx, ecx
call fcn.18001a608
movsxd r14, eax
test eax, eax
jne 0x18001a77b
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x18001a711
mov rcx, r14
call fcn.180013bc0
mov rdi, rax
test rax, rax
jne 0x18001a794
xor ecx, ecx
call fcn.180013b84
jmp 0x18001a770
mov qword [rsp + 0x38], rsi
mov r9d, ebp
mov qword [rsp + 0x30], rsi
mov r8, rbx
mov dword [rsp + 0x28], r14d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rdi
call fcn.18001a608
test eax, eax
jne 0x18001a7c5
mov rcx, rdi
call fcn.180013b84
jmp 0x18001a7cf
xor ecx, ecx
call fcn.180013b84
mov rsi, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rsi
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r14
ret
Function at 0x18002057c
Capabilities:
Clear file content

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x20
mov rbx, rdx
mov rsi, r8
xor edx, edx
mov r14d, ecx
lea r8d, [rdx + 1]
call fcn.18001d984
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.18001d984
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x1800206cc
cmp rax, 0xffffffffffffffff
je 0x1800206cc
xor edi, edi
test rbp, rbp
jle 0x180020677
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.18001362c
mov rbx, rax
test rax, rax
jne 0x180020604
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x18002066d
mov edx, 0x8000
mov ecx, r14d
call fcn.180020400
mov r15d, eax
mov eax, 0x1000
mov r8d, ebp
cmp rbp, rax
mov r9, rsi
mov rdx, rbx
mov ecx, r14d
cmovge r8d, eax
call fcn.180016878
cmp eax, 0xffffffff
je 0x18002064d
cdqe
sub rbp, rax
test rbp, rbp
jg 0x180020614
mov edx, r15d
mov ecx, r14d
call fcn.180020400
jmp 0x18002066d
cmp byte [rsi + 0x38], dil
je 0x180020664
cmp dword [rsi + 0x34], 5
jne 0x180020664
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x18002066d
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.180013b84
jmp 0x1800206e0
jns 0x1800206e0
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.18001d984
cmp rax, 0xffffffffffffffff
jne 0x180020698
cmp byte [rsi + 0x30], dil
je 0x1800206e0
mov edi, dword [rsi + 0x2c]
jmp 0x1800206e0
mov ecx, r14d
call fcn.18001d6a4
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x1800206e0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [rsi + 0x38], 1
mov edi, 0xd
mov dword [rsi + 0x34], eax
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
jmp 0x1800206e0
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x1800206d9
mov eax, dword [rsi + 0x2c]
jmp 0x1800206de
mov eax, 0x16
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.18001d984
mov rbx, qword [rsp + 0x40]
mov eax, edi
mov rdi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop r12
ret

Function at 0x180021320
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x180021348
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x180021348
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret