joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10021880
Capabilities:
Create thread

Disassembly:
push ecx
lea eax, [esp]
push eax
push 0
push ecx
push edx
push 0
push 0
call fcn.10048f9c
mov ecx, dword [esp + 0x20]
add esp, 0x18
mov dword [ecx], eax
test eax, eax
je 0x100218a3
xor eax, eax
pop ecx
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x100218b2
mov eax, 1
pop ecx
ret

Function at 0x100219b0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov edx, dword [esp + 0xc]
sub esp, 8
push ebp
mov ebp, dword [edx]
xor eax, eax
and ebp, 7
cmp ecx, 5
jae 0x100219c9
pop ebp
add esp, 8
ret
mov edx, dword [esp + 0x10]
push ebx
push esi
mov esi, dword [esp + 0x1c]
add esi, 5
lea edx, [edx + ecx - 4]
push edi
mov dword [esp + 0x20], esi
mov dword [esp + 0x10], 0xffffffff
mov dword [esp + 0x14], edx
jmp 0x100219f0
mov ecx, dword [esp + 0x1c]
lea edi, [eax + ecx]
cmp edi, edx
jae 0x10021a0d
jmp 0x10021a00
mov al, byte [edi]
and al, 0xfe
cmp al, 0xe8
je 0x10021a0d
inc edi
cmp edi, edx
jb 0x10021a00
mov eax, edi
sub eax, ecx
mov ecx, eax
sub ecx, dword [esp + 0x10]
cmp edi, edx
jae 0x10021b22
cmp ecx, 3
jbe 0x10021a41
xor ebp, ebp
mov cl, byte [edi + 4]
mov dword [esp + 0x10], eax
test cl, cl
je 0x10021a7b
cmp cl, 0xff
je 0x10021a7b
and ebp, 3
add ebp, ebp
or ebp, 1
inc eax
jmp 0x100219f0
dec ecx
shl ebp, cl
and ebp, 7
je 0x10021a26
movzx ecx, byte [ebp + 0x1006b410]
mov ebx, edi
sub ebx, ecx
cmp byte [ebp + 0x1006b408], 0
mov cl, byte [ebx + 4]
je 0x10021a69
test cl, cl
je 0x10021a69
cmp cl, 0xff
jne 0x10021a26
and ebp, 3
add ebp, ebp
mov dword [esp + 0x10], eax
or ebp, 1
inc eax
jmp 0x100219f0
movzx edx, cl
movzx ecx, byte [edi + 3]
shl edx, 8
or edx, ecx
movzx ecx, byte [edi + 2]
shl edx, 8
or edx, ecx
movzx ecx, byte [edi + 1]
shl edx, 8
or edx, ecx
lea esp, [esp]
cmp dword [esp + 0x28], 0
je 0x10021aae
lea ebx, [edx + eax]
add ebx, esi
jmp 0x10021ab4
sub edx, eax
sub edx, esi
mov ebx, edx
test ebp, ebp
je 0x10021af4
movzx esi, byte [ebp + 0x1006b410]
add esi, esi
add esi, esi
add esi, esi
mov ecx, 0x18
sub ecx, esi
mov edx, ebx
shr edx, cl
test dl, dl
je 0x10021ad9
cmp dl, 0xff
jne 0x10021af0
mov ecx, 0x20
sub ecx, esi
mov esi, dword [esp + 0x20]
mov edx, 1
shl edx, cl
dec edx
xor edx, ebx
jmp 0x10021aa0
mov esi, dword [esp + 0x20]
mov edx, ebx
shr edx, 0x18
and dl, 1
dec dl
not dl
mov byte [edi + 4], dl
mov edx, ebx
shr edx, 8
mov ecx, ebx
shr ecx, 0x10
mov byte [edi + 2], dl
mov edx, dword [esp + 0x14]
mov byte [edi + 3], cl
mov byte [edi + 1], bl
add eax, 5
jmp 0x100219f0
pop edi
pop esi
pop ebx
cmp ecx, 3
jbe 0x10021b37
mov ecx, dword [esp + 0x18]
xor ebp, ebp
mov dword [ecx], ebp
pop ebp
add esp, 8
ret
dec ecx
shl ebp, cl
mov ecx, dword [esp + 0x18]
and ebp, 7
mov dword [ecx], ebp
pop ebp
add esp, 8
ret
Function at 0x10024190
Capabilities:
Hash data with crc32

Disassembly:
test ecx, ecx
jne 0x10024197
xor eax, eax
ret
mov eax, dword [esp + 4]
jmp fcn.100241a0
Function at 0x1002a6e0
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [ecx]
cmp eax, 8
push esi
jle 0x1002a723
mov edx, eax
and edx, 1
mov eax, dword [ecx + 0x10]
je 0x1002a6f9
add eax, eax
sub eax, dword [ecx + 0x14]
jmp 0x1002a701
lea eax, [eax + eax*2]
sub eax, dword [ecx + 0x14]
sar eax, 1
mov esi, dword [ecx + 0x10]
mov dword [ecx + 0x14], esi
mov dword [ecx + 0x10], eax
test edx, edx
je 0x1002a717
add eax, eax
sub eax, esi
mov dword [ecx + 0x14], eax
pop esi
ret
lea eax, [eax + eax*2]
sub eax, esi
sar eax, 1
mov dword [ecx + 0x14], eax
pop esi
ret
cmp eax, 1
jle 0x1002a75b
push edi
lea edi, [eax - 1]
cdq
sub eax, edx
xor esi, esi
sar eax, 1
je 0x1002a75a
and edi, 7
mov edx, dword [ecx + edi*4 + 0x10]
and esi, 7
xor dword [ecx + esi*4 + 0x10], edx
mov edx, dword [ecx + esi*4 + 0x10]
xor dword [ecx + edi*4 + 0x10], edx
mov edx, dword [ecx + edi*4 + 0x10]
xor dword [ecx + esi*4 + 0x10], edx
dec eax
dec edi
inc esi
test eax, eax
jne 0x1002a735
pop edi
pop esi
ret

Function at 0x1002cb70
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [ecx]
cmp eax, 8
push esi
push edi
jle 0x1002cbe2
mov edx, dword [ecx + 0x30]
mov esi, eax
and esi, 1
mov eax, dword [ecx + 0x10]
je 0x1002cb92
add eax, eax
sub eax, dword [ecx + 0x14]
add edx, edx
sub edx, dword [ecx + 0x34]
jmp 0x1002cba2
lea eax, [eax + eax*2]
sub eax, dword [ecx + 0x14]
lea edx, [edx + edx*2]
sub edx, dword [ecx + 0x34]
sar eax, 1
sar edx, 1
mov edi, dword [ecx + 0x10]
mov dword [ecx + 0x14], edi
mov edi, dword [ecx + 0x30]
mov dword [ecx + 0x34], edi
mov dword [ecx + 0x10], eax
mov dword [ecx + 0x30], edx
test esi, esi
je 0x1002cbca
add eax, eax
sub eax, dword [ecx + 0x14]
add edx, edx
sub edx, edi
pop edi
mov dword [ecx + 0x14], eax
mov dword [ecx + 0x34], edx
pop esi
ret
lea eax, [eax + eax*2]
sub eax, dword [ecx + 0x14]
lea edx, [edx + edx*2]
sub edx, edi
sar eax, 1
sar edx, 1
pop edi
mov dword [ecx + 0x14], eax
mov dword [ecx + 0x34], edx
pop esi
ret
cmp eax, 1
jle 0x1002cc30
lea edi, [eax - 1]
cdq
sub eax, edx
xor esi, esi
sar eax, 1
je 0x1002cc30
and edi, 7
mov edx, dword [ecx + edi*4 + 0x10]
and esi, 7
xor dword [ecx + esi*4 + 0x10], edx
mov edx, dword [ecx + esi*4 + 0x10]
xor dword [ecx + edi*4 + 0x10], edx
mov edx, dword [ecx + edi*4 + 0x10]
xor dword [ecx + esi*4 + 0x10], edx
mov edx, dword [ecx + edi*4 + 0x30]
xor dword [ecx + esi*4 + 0x30], edx
mov edx, dword [ecx + esi*4 + 0x30]
xor dword [ecx + edi*4 + 0x30], edx
mov edx, dword [ecx + edi*4 + 0x30]
xor dword [ecx + esi*4 + 0x30], edx
dec eax
dec edi
inc esi
test eax, eax
jne 0x1002cbf3
pop edi
pop esi
ret
Function at 0x1003cfb0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebx
push ebp
mov ebp, dword [esp + 0xc]
push esi
mov ebx, eax
xor esi, esi
push edi
mov edi, ecx
test ebx, ebx
je 0x1003d06c
mov eax, dword [edi]
cdq
xor eax, edx
sub eax, edx
mov ecx, eax
shr ecx, 9
add eax, ecx
dec ebx
add edi, 4
cmp eax, 0x100
jae 0x1003d005
movsx edx, byte [eax + 0x100625e0]
mov ecx, 9
sub ecx, edx
shl eax, cl
shl edx, 8
and eax, 0xff
movzx eax, byte [eax + 0x100626e0]
add edx, esi
lea esi, [edx + eax]
jmp 0x1003d064
cmp eax, 0x10000
jae 0x1003d01d
mov ecx, eax
shr ecx, 8
movsx edx, byte [ecx + 0x100625e0]
add edx, 8
jmp 0x1003d044
cmp eax, 0x1000000
jae 0x1003d035
mov edx, eax
shr edx, 0x10
movsx edx, byte [edx + 0x100625e0]
add edx, 0x10
jmp 0x1003d044
mov ecx, eax
shr ecx, 0x18
movsx edx, byte [ecx + 0x100625e0]
add edx, 0x18
lea ecx, [edx - 9]
shr eax, cl
shl edx, 8
and eax, 0xff
movzx eax, byte [eax + 0x100626e0]
add eax, edx
add esi, eax
test ebp, ebp
je 0x1003d064
cmp eax, ebp
jge 0x1003d073
test ebx, ebx
jne 0x1003cfc6
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
ret
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
ret
Function at 0x10040a70
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x1005ca71
mov eax, dword fs:[0]
push eax
push ebx
push ebp
push edi
mov eax, dword [0x10071430]
xor eax, esp
push eax
lea eax, [esp + 0x10]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x28]
mov edi, dword [esp + 0x20]
xor ebx, ebx
mov dword [edi + 0x2c], ebx
mov dword [esp + 0x18], ebx
mov dword [edi + 0x30], ebx
mov dword [edi + 0x34], ebx
mov eax, dword [esp + 0x24]
mov byte [esp + 0x18], 2
mov dword [edi + 0xc], ebx
mov dword [edi + 0x14], ebx
mov dword [edi + 0x18], eax
mov dword [edi + 0x10], ebx
cmp dword [edi + 0x30], esi
je 0x10040ae2
cmp esi, ebx
je 0x10040ad0
mov ecx, dword [esi]
mov edx, dword [ecx + 4]
push esi
call edx
mov eax, dword [edi + 0x30]
cmp eax, ebx
je 0x10040adf
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [edi + 0x30], esi
cmp dword [edi + 0x2c], ebp
je 0x10040b06
cmp ebp, ebx
je 0x10040af4
mov eax, dword [ebp]
mov ecx, dword [eax + 4]
push ebp
call ecx
mov eax, dword [edi + 0x2c]
cmp eax, ebx
je 0x10040b03
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
mov dword [edi + 0x2c], ebp
mov eax, dword [edi + 0x14]
sub eax, 1
mov ecx, dword [esp + 0x2c]
mov dword [edi + 0x1c], ebx
mov dword [edi + 0x20], ebx
mov dword [edi + 0x38], ebx
mov dword [edi + 0x3c], ebx
mov dword [edi + 0x24], ecx
mov dword [edi + 0x28], ebx
mov byte [edi + 8], bl
je 0x10040b35
sub eax, 1
jne 0x10040b3a
mov ecx, edi
call fcn.10040e20
jmp 0x10040b3a
call fcn.10040d20
mov eax, edi
mov ecx, dword [esp + 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebp
pop ebx
add esp, 0xc
ret 0x10
Function at 0x10040b60
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x1005c801
mov eax, dword fs:[0]
push eax
push esi
push edi
mov eax, dword [0x10071430]
xor eax, esp
push eax
lea eax, [esp + 0xc]
mov dword fs:[0], eax
mov esi, dword [esp + 0x1c]
mov eax, 2
mov dword [esp + 0x14], eax
cmp dword [esi + 0x14], eax
jne 0x10040bd9
cmp dword [esi + 0x10], 1
jne 0x10040bd9
mov edi, dword [esi]
cmp byte [edi], 0
jne 0x10040bd9
mov eax, dword [edi + 0x14]
mov dword [esi + 0x18], eax
mov eax, dword [edi + 0x14]
mov ecx, dword [edi + 4]
push eax
push ecx
mov byte [edi + 0x18], 0
call fcn.1004949b
mov dword [edi + 4], eax
mov dword [esi + 0xc], eax
call fcn.10049d5e
mov edx, dword [esi + 0x18]
add eax, 0x20
push eax
mov eax, dword [esi + 0xc]
push edx
push 1
push eax
call fcn.1004a364
add esp, 0x18
cmp dword [esi + 0x14], 0
jne 0x10040c02
mov eax, dword [esi + 0x2c]
test eax, eax
je 0x10040c45
mov edx, dword [esi + 0x34]
test edx, edx
je 0x10040c45
mov ecx, dword [esi + 0x38]
test ecx, ecx
je 0x10040c45
mov edi, dword [eax]
push 0
push ecx
mov ecx, dword [edi + 0xc]
push edx
push eax
call ecx
jmp 0x10040c45
cmp dword [esi + 0x10], 0
jne 0x10040c24
cmp byte [esi + 8], 0
je 0x10040c1a
mov edx, dword [esi + 0xc]
push edx
call fcn.100491ea
add esp, 4
mov eax, dword [esi + 4]
test eax, eax
je 0x10040c45
push eax
jmp 0x10040c3d
mov edi, dword [esi]
test edi, edi
je 0x10040c45
cmp byte [edi + 0x18], 0
je 0x10040c3c
mov eax, dword [edi + 4]
push eax
call fcn.100491ea
add esp, 4
push edi
call fcn.10047eaf
add esp, 4
mov eax, dword [esi + 0x34]
test eax, eax
je 0x10040c5c
push eax
call fcn.1004852e
add esp, 4
mov dword [esi + 0x34], 0
mov byte [esp + 0x14], 0
mov eax, dword [esi + 0x30]
test eax, eax
je 0x10040c70
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [esp + 0x14], 0xffffffff
mov esi, dword [esi + 0x2c]
test esi, esi
je 0x10040c87
mov eax, dword [esi]
mov ecx, dword [eax + 8]
push esi
call ecx
mov ecx, dword [esp + 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
add esp, 0xc
ret 4
Function at 0x10040e20
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x1005c7bb
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push ebp
push esi
push edi
mov eax, dword [0x10071430]
xor eax, esp
push eax
lea eax, [esp + 0x18]
mov dword fs:[0], eax
mov edi, ecx
xor ebx, ebx
cmp dword [edi + 0x10], ebx
jne 0x10040f40
push 0x1c
call fcn.1004846c
mov esi, eax
add esp, 4
mov dword [esp + 0x14], esi
mov dword [esp + 0x20], ebx
cmp esi, ebx
je 0x10040e93
mov eax, 0x10000
push eax
mov dword [esi + 0xc], eax
mov dword [esi + 0x14], ebx
mov byte [esi], bl
mov byte [esi + 0x18], 1
mov dword [esi + 8], eax
call fcn.100492c7
add esp, 4
mov dword [esi + 4], eax
cmp eax, ebx
jne 0x10040e95
mov byte [esi], 1
jmp 0x10040e95
xor esi, esi
push 1
push 0x100000
mov dword [esp + 0x28], 0xffffffff
call fcn.1004a8a8
mov ebp, eax
add esp, 8
cmp ebp, ebx
je 0x10040ef1
call fcn.10049d5e
push eax
push 0x100000
push 1
push ebp
call fcn.1004a1b3
add esp, 0x10
cmp eax, ebx
jle 0x10040ef1
lea esp, [esp]
mov ecx, ebp
call fcn.10040960
call fcn.10049d5e
push eax
push 0x100000
push 1
push ebp
call fcn.1004a1b3
add esp, 0x10
cmp eax, ebx
jg 0x10040ed0
cmp byte [esi], bl
je 0x10040efd
mov dword [edi + 0xc], ebx
mov dword [edi + 0x18], ebx
jmp 0x10040f1c
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 4]
push eax
push ecx
mov byte [esi + 0x18], bl
call fcn.1004949b
mov dword [esi + 4], eax
mov dword [edi + 0xc], eax
mov edx, dword [esi + 0x14]
add esp, 8
mov dword [edi + 0x18], edx
cmp byte [esi + 0x18], bl
je 0x10040f2d
mov eax, dword [esi + 4]
push eax
call fcn.100491ea
add esp, 4
push esi
call fcn.10047eaf
push ebp
call fcn.100491ea
add esp, 8
mov byte [edi + 8], 1
call fcn.10040d20
mov ecx, dword [esp + 0x18]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
Function at 0x10044200
Capabilities:
Get process heap flags

Disassembly:
push 0xffffffffffffffff
push 0x1005cb06
mov eax, dword fs:[0]
push eax
sub esp, 0x18
mov eax, dword [0x10071430]
xor eax, esp
mov dword [esp + 0x14], eax
push ebx
push ebp
push esi
mov eax, dword [0x10071430]
xor eax, esp
push eax
lea eax, [esp + 0x28]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x38]
push 0x40
mov esi, ecx
call fcn.1004846c
add esp, 4
mov dword [esp + 0x10], eax
xor ebx, ebx
mov dword [esp + 0x30], ebx
cmp eax, ebx
je 0x1004425c
push ebx
push ebx
push ebx
push eax
call fcn.10040a70
mov esi, eax
jmp 0x1004425e
xor esi, esi
mov dword [esp + 0x30], 0xffffffff
mov ecx, esi
mov dword [edi + 0x30], esi
call fcn.10040cc0
test al, al
je 0x1004429d
mov dword [edi + 0x5c], 2
xor eax, eax
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x14]
xor ecx, esp
call fcn.10047eba
add esp, 0x24
ret 4
mov byte [esp + 0x10], bl
mov byte [esp + 0x11], bl
cmp dword [esi + 0x14], ebx
jne 0x100442b8
push 2
lea eax, [esp + 0x14]
push eax
call fcn.100410c0
jmp 0x100442ca
lea ecx, [esp + 0x10]
push ecx
mov ecx, dword [esi + 4]
mov eax, 2
call fcn.10040a00
cmp eax, 2
jne 0x1004427b
cmp byte [esp + 0x10], 0xff
jne 0x1004427b
cmp byte [esp + 0x11], 0xd8
jne 0x1004427b
mov esi, dword [edi + 0x30]
xor eax, eax
lea edx, [esp + 0x14]
push edx
mov byte [esp + 0x18], bl
mov dword [esp + 0x19], eax
mov dword [esp + 0x1d], eax
mov dword [esp + 0x21], eax
mov byte [esp + 0x25], al
call fcn.10041020
mov eax, dword [esp + 0x18]
cmp eax, 0x4649464a
je 0x10044316
cmp eax, 0x66697845
jne 0x1004427b
push 0x40
call fcn.1004846c
add esp, 4
mov dword [esp + 0x10], eax
mov dword [esp + 0x30], 1
cmp eax, ebx
je 0x1004433d
push ebx
push ebp
push ebx
push eax
xor esi, esi
call fcn.10040a70
jmp 0x1004433f
xor eax, eax
mov ecx, eax
mov dword [edi + 0x34], eax
call fcn.10040cc0
test al, al
jne 0x10044274
mov eax, 1
jmp 0x1004427d
Function at 0x10047eba
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x10071430]
jne 0x10047ec4
repz ret
jmp fcn.1004b3d3

Function at 0x10055349
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.1004bf53
and dword [ebp - 4], 0
cmp dword [0x10073ca0], 0
mov ebx, eax
jne 0x100553fa
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x100554ab
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
je 0x100554ab
push eax
call fcn.1004bee1
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x10073ca0], eax
call esi
push eax
call fcn.1004bee1
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x10073ca4], eax
call esi
push eax
call fcn.1004bee1
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x10073ca8], eax
call esi
push eax
call fcn.1004bee1
pop ecx
mov dword [0x10073cb0], eax
test eax, eax
je 0x100553fa
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.1004bee1
pop ecx
mov dword [0x10073cac], eax
mov eax, dword [0x10073cac]
cmp eax, ebx
je 0x10055452
cmp dword [0x10073cb0], ebx
je 0x10055452
push eax
call fcn.1004bf5c
push dword [0x10073cb0]
mov esi, eax
call fcn.1004bf5c
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x10055452
test edi, edi
je 0x10055452
call esi
test eax, eax
je 0x10055449
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x10055449
test byte [ebp - 0xc], 1
jne 0x10055452
or dword [ebp + 0x10], 0x200000
jmp 0x1005548b
mov eax, dword [0x10073ca4]
cmp eax, ebx
je 0x1005548b
push eax
call fcn.1004bf5c
pop ecx
test eax, eax
je 0x1005548b
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x1005548b
mov eax, dword [0x10073ca8]
cmp eax, ebx
je 0x1005548b
push eax
call fcn.1004bf5c
pop ecx
test eax, eax
je 0x1005548b
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x10073ca0]
call fcn.1004bf5c
pop ecx
test eax, eax
je 0x100554ab
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x100554ad
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x1005bc30
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1005d061
mov eax, dword fs:[0]
push eax
sub esp, 0x2d4
mov eax, dword [0x10071430]
xor eax, ebp
mov dword [ebp - 0x18], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x1005bc71
xor al, al
jmp 0x1005be1a
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], 0
jmp 0x1005bc90
mov edx, dword [ebp - 0x14]
add edx, 1
mov dword [ebp - 0x14], edx
cmp dword [ebp - 0x14], 9
jae 0x1005be18
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax*4 + 0x10072b5c]
push ecx
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.SHLWAPI.dll_StrStrW]
test eax, eax
je 0x1005be13
movzx eax, byte [0x10075e9c]
test eax, eax
jne 0x1005bd77
xor ecx, ecx
mov word [ebp - 0x23c], cx
push 0x206
push 0
lea edx, [ebp - 0x23a]
push edx
call fcn.1004c5f0
add esp, 0xc
push 0x104
lea eax, [ebp - 0x23c]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x23c]
lea ecx, [ebp - 0x258]
call fcn.1000a170
mov dword [ebp - 4], 0
lea edx, [ebp - 0x258]
push edx
lea eax, [ebp - 0x274]
push eax
call fcn.1005b980
add esp, 8
mov dword [ebp - 0x2dc], eax
mov ecx, dword [ebp - 0x2dc]
mov dword [ebp - 0x2e0], ecx
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x2e0]
mov ecx, 0x10075ebc
call fcn.100066d0
mov byte [ebp - 4], 0
lea esi, [ebp - 0x274]
call fcn.10006a90
mov dword [ebp - 4], 0xffffffff
lea esi, [ebp - 0x258]
call fcn.10006a90
mov byte [0x10075e9c], 1
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x290]
call fcn.1000a170
mov dword [ebp - 4], 2
lea edx, [ebp - 0x290]
push edx
lea eax, [ebp - 0x34]
push eax
call fcn.1005b980
add esp, 8
mov byte [ebp - 4], 4
lea esi, [ebp - 0x290]
call fcn.10006a90
push 0x10075ebc
lea ecx, [ebp - 0x34]
push ecx
call fcn.10047d20
add esp, 8
movzx edx, al
test edx, edx
je 0x1005bde6
mov byte [ebp - 0x291], 0
mov dword [ebp - 4], 0xffffffff
lea esi, [ebp - 0x34]
call fcn.10006a90
mov al, byte [ebp - 0x291]
jmp 0x1005be1a
mov byte [ebp - 0x292], 1
mov dword [ebp - 4], 0xffffffff
lea esi, [ebp - 0x34]
call fcn.10006a90
mov al, byte [ebp - 0x292]
jmp 0x1005be1a
jmp 0x1005bc87
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x18]
xor ecx, ebp
call fcn.10047eba
mov esp, ebp
pop ebp
ret
Function at 0x40157c
Capabilities:
Allocate thread local storage
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
and dword [ebp - 4], 0
and dword [ebp - 8], 0
cmp dword [esi + 0x490], 2
push ebx
push edi
jne 0x4015e0
lea ebx, [esi + 0x4a0]
lea eax, [esi + 0x49c]
push ebx
push eax
call fcn.004028e3
mov edi, eax
test edi, edi
jns 0x4015b7
push str.Failed_to_create_implicit_elevated_connection_name_and_secret.
jmp 0x401722
push dword [esi + 0x4d0]
push dword [ebx]
push dword [esi + 0x49c]
push dword [esi + 0x2c]
push dword [ebp + 0xc]
call fcn.00402a21
mov edi, eax
test edi, edi
jns 0x4015e0
push str.Failed_to_launch_unelevated_process.
jmp 0x401722
push 1
lea eax, [esi + 0x49c]
push eax
call fcn.004038be
mov edi, eax
test edi, edi
jns 0x4015fe
push str.Failed_to_connect_to_unelevated_process.
jmp 0x401722
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [esi + 0x494], eax
cmp eax, 0xffffffff
jne 0x401648
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x401623
and eax, 0xffff
or eax, 0x80070000
mov edi, eax
test edi, edi
js 0x40162e
mov edi, 0x80004005
push edi
push 0x1c7
push str.engine.cpp
call fcn.00432f68
push str.Failed_to_allocate_thread_local_storage_for_logging.
jmp 0x401722
push dword [esi + 0x4ac]
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x401692
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x40166d
and eax, 0xffff
or eax, 0x80070000
mov edi, eax
test edi, edi
js 0x401678
mov edi, 0x80004005
push edi
push 0x1cc
push str.engine.cpp
call fcn.00432f68
push str.Failed_to_set_elevated_pipe_into_thread_local_storage_for_logging.
jmp 0x401722
push esi
push dword [ebp + 8]
call fcn.004115a1
mov edi, eax
test edi, edi
jns 0x4016a8
push str.Failed_to_create_the_message_window.
jmp 0x401722
push 1
call fcn.00433670
push esi
push 0x40131f
call fcn.0042f753
lea eax, [esi + 0x18]
push eax
lea eax, [esi + 0xf4]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [esi + 0xb8]
push eax
lea eax, [esi + 0xf8]
push eax
lea eax, [esi + 0x88]
push eax
lea eax, [esi + 0x2b8]
push eax
lea eax, [esi + 0x2c0]
push eax
lea eax, [esi + 0x2a8]
push eax
push dword [esi + 0x4b0]
push dword [esi + 0x4ac]
push dword [esi + 0x494]
call fcn.004111a9
push 0
push 0
mov edi, eax
call fcn.0042f753
test edi, edi
jns 0x40172a
push str.Failed_to_pump_messages_from_parent_process.
push edi
call fcn.004300f7
pop ecx
pop ecx
xor ebx, ebx
push ebx
push ebx
call fcn.0042f753
push esi
call fcn.004112cc
cmp dword [ebp - 8], ebx
je 0x401743
call fcn.0040e8f9
cmp dword [ebp - 4], ebx
je 0x40175a
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
pop edi
pop ebx
leave
ret 8
Function at 0x402f4a
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push edi
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 8]
push eax
push dword [ebp + 0x14]
xor edi, edi
push dword [ebp + 0x10]
mov dword [ebp - 8], edi
push dword [ebp + 0xc]
mov dword [ebp - 4], edi
call fcn.00402eae
mov ebx, eax
cmp ebx, edi
jge 0x402f84
push str.Failed_to_allocate_message_to_write.
push ebx
call fcn.004300f7
pop ecx
pop ecx
jmp 0x402ff1
push esi
xor esi, esi
mov dword [ebp + 0x14], edi
cmp dword [ebp - 4], edi
jbe 0x402ff0
push edi
lea eax, [ebp + 0x14]
push eax
mov eax, dword [ebp - 4]
sub eax, esi
push eax
push dword [ebp - 8]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x402fb4
add esi, dword [ebp + 0x14]
cmp esi, dword [ebp - 4]
jb 0x402f8f
jmp 0x402ff0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, edi
jle 0x402fc8
and eax, 0xffff
or eax, 0x80070000
mov ebx, eax
cmp ebx, edi
jl 0x402fd3
mov ebx, 0x80004005
push ebx
push 0x309
push str.pipe.cpp
call fcn.00432f68
push str.Failed_to_write_message_type_to_pipe.
push ebx
call fcn.004300f7
pop ecx
pop ecx
pop esi
cmp dword [ebp - 8], edi
je 0x402ffe
push dword [ebp - 8]
call fcn.00432b10
pop edi
mov eax, ebx
pop ebx
leave
ret 0x10