joyce8/EMBER2024-capa huggingface dataset:
Function at 0x18120e09
Capabilities:
Query service status
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x181c7008]
xor eax, ebp
mov dword [ebp - 4], eax
movzx ecx, byte [0x181cf83a]
push ebx
push esi
neg ecx
push edi
sbb ecx, ecx
push 7
pop edi
and ecx, 0x181cea00
je 0x18120e58
xor eax, eax
mov dword [ebp - 0x38], ecx
inc eax
mov dword [ebp - 0x34], edi
push eax
push edi
mov dword [ebp - 0x30], eax
call fcn.18005bab
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x38]
push str._StartService_
push eax
call fcn.18004175
pop ecx
pop ecx
push 0xf003f
xor ebx, ebx
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, eax
mov dword [ebp - 0x28], esi
test esi, esi
jne 0x18120e79
call fcn.18013c6a
mov ebx, eax
jmp 0x18120ef6
lea ecx, [ebp - 0x24]
call fcn.1804c01a
push 0x14
push dword [ebp - 0x24]
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
jne 0x18120e9a
call fcn.18013c6a
jmp 0x18120ed7
mov ecx, edi
xor eax, eax
lea edi, [ebp - 0x20]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x20]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x18120ebe
cmp dword [ebp - 0x1c], 4
je 0x18120ed9
cmp dword [ebp - 0x1c], 2
je 0x18120ed9
push ebx
push ebx
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x18120ed9
call fcn.18013c6a
cmp eax, 0x80070420
je 0x18120ed9
mov ebx, eax
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test esi, esi
je 0x18120ee6
push esi
call edi
mov ecx, dword [ebp - 0x24]
lea ecx, [ecx - 0x10]
call fcn.18004637
push dword [ebp - 0x28]
call edi
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.18141824
leave
ret

Function at 0x181213f2
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x21c
mov eax, dword [0x181c7008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov ebx, ecx
lea ecx, [ebp - 0x214]
push edi
call fcn.1800e732
xor edi, edi
mov esi, dword [eax]
xor eax, eax
mov word [ebp - 0x210], ax
test esi, esi
je 0x18121444
cmp word [esi], di
je 0x18121444
lea eax, [ebp - 0x210]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov ecx, dword [ebp - 0x214]
lea ecx, [ecx - 0x10]
call fcn.18004637
cmp byte [ebx], 0
je 0x1812146d
call fcn.180b2023
lea eax, [ebp - 0x218]
push eax
call fcn.180b2b33
xor ebx, ebx
inc ebx
jmp 0x18121483
call fcn.180b2023
lea eax, [ebp - 0x214]
push eax
call fcn.180b2247
push 2
mov ebx, edi
pop edi
mov ecx, dword [eax]
sub ecx, 0x10
call fcn.18006e74
mov esi, eax
test edi, edi
je 0x181214a1
mov ecx, dword [ebp - 0x214]
lea ecx, [ecx - 0x10]
call fcn.18004637
test ebx, ebx
je 0x181214b3
mov ecx, dword [ebp - 0x218]
lea ecx, [ecx - 0x10]
call fcn.18004637
lea ecx, [esi + 0x10]
call fcn.18008c7b
lea ecx, [esi]
call fcn.18004637
cmp word [ebp - 0x210], 0
je 0x181214d9
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.18141824
leave
ret
Function at 0x18126d95
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, ecx
push edi
push esi
mov dword [ebp - 4], esi
lea eax, [esi + 8]
push eax
call fcn.180aa4ba
movzx edx, word [esi + 0xe8]
xor ebx, ebx
push ecx
push ecx
mov byte [esi + 0x20], bl
mov dword [esi + 0x24], ebx
mov ecx, dword [0x181ccd08]
push ebx
call fcn.18128142
add esp, 0xc
cmp dword [esi + 0x24], ebx
jge 0x18126de8
test eax, eax
je 0x18126dec
push dword [esi + 4]
call dword [sym.imp.USER32.dll_DestroyWindow]
push dword [esi + 0x24]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, ebx
test eax, eax
jne 0x18126df6
mov eax, 0x80040e80
jmp 0x18126f3d
push dword [esi + 0x130]
mov edi, dword [sym.imp.USER32.dll_SetWindowTextW]
push dword [esi + 4]
call edi
push ecx
mov ecx, esi
call fcn.18126f42
mov ebx, dword [sym.imp.USER32.dll_GetDlgItem]
push 0x7d7
push dword [esi + 4]
call ebx
mov esi, eax
push 1
push esi
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [ebp - 4]
push dword [eax + 0x124]
push esi
call edi
mov esi, dword [ebp - 4]
mov ecx, esi
call fcn.18126f98
push 2
push 0xff
push 0
lea edi, [esi + 4]
push dword [edi]
call dword [sym.imp.USER32.dll_SetLayeredWindowAttributes]
push 0
mov ecx, edi
call fcn.18007c81
mov ecx, dword [edi]
lea eax, [esi + 0x134]
push eax
call fcn.1801482a
sub esp, 0xc
lea ecx, [esi + 0x128]
push 0x5a
call fcn.181274fd
push ecx
push ecx
push dword [esi + 0x128]
push ecx
mov ecx, edi
call fcn.1812363b
sub esp, 0x10
lea edi, [esi + 0x12c]
mov ecx, edi
push 0x96
call fcn.181274fd
push 0x7d7
push dword [esi + 4]
call ebx
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
push 1
push dword [edi]
push 0x30
push eax
call esi
mov eax, dword [ebp - 4]
push 0x7d8
push dword [eax + 4]
call ebx
push 1
push dword [edi]
push 0x30
push eax
call esi
mov eax, dword [ebp - 4]
push 0x7da
push dword [eax + 4]
call ebx
push 1
push dword [edi]
push 0x30
push eax
call esi
mov eax, dword [ebp - 4]
push 0x7db
push dword [eax + 4]
call ebx
push 1
push dword [edi]
push 0x30
push eax
call esi
mov esi, dword [ebp - 4]
push 0x7d1
push dword [esi + 4]
call ebx
push ecx
push eax
push dword [esi + 4]
lea ecx, [esi + 0x28]
call fcn.1812b55b
push ecx
push ecx
lea ecx, [esi + 0xd4]
call fcn.1812b66a
push 0
push 0x18128ec7
push dword [esi + 4]
call dword [sym.imp.USER32.dll_EnumChildWindows]
push 1
mov ecx, esi
call fcn.18127039
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x1812885d
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x134
mov eax, dword [0x181c7008]
xor eax, ebp
mov dword [ebp - 4], eax
movzx eax, word [ebp + 8]
push esi
mov esi, dword [0x181ccd08]
push edi
push 0xf0
push eax
xor edi, edi
mov dword [ebp - 0x10c], ecx
push esi
inc edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x181289ca
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x181289ca
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x181289ca
push ebx
movzx eax, word [esi]
xor ecx, ecx
cmp cx, ax
je 0x181289c9
mov ecx, dword [esi + 4]
mov ebx, eax
movzx eax, word [esi + 2]
add esi, 8
mov dword [ebp - 0x110], ecx
mov ecx, 0x403
cmp cx, ax
jne 0x18128944
push 3
lea eax, [ebp - 0x104]
push esi
lea ecx, [ebp - 0x108]
mov dword [ebp - 0x108], eax
call fcn.18024fe4
push dword [ebp - 0x108]
mov eax, dword [ebp - 0x10c]
push 0
push 0x143
push ebx
push dword [eax + 4]
call dword [sym.imp.USER32.dll_SendDlgItemMessageW]
inc eax
neg eax
sbb eax, eax
and edi, eax
lea eax, [ebp - 0x104]
cmp dword [ebp - 0x108], eax
je 0x181289bb
push dword [ebp - 0x108]
call fcn.18148166
pop ecx
jmp 0x181289bb
mov ecx, 0x1234
cmp cx, ax
jne 0x181289bb
or dword [ebp - 0x130], 0xffffffff
lea eax, [ebp - 0x104]
push 3
push esi
lea ecx, [ebp - 0x108]
mov dword [ebp - 0x134], 1
mov dword [ebp - 0x108], eax
call fcn.18024fe4
mov eax, dword [ebp - 0x108]
lea ecx, [ebp - 0x104]
mov dword [ebp - 0x12c], eax
cmp eax, ecx
je 0x18128996
push eax
call fcn.18148166
pop ecx
lea eax, [ebp - 0x134]
push eax
mov eax, dword [ebp - 0x10c]
push 0
push 0x40b
push ebx
push dword [eax + 4]
call dword [sym.imp.USER32.dll_SendDlgItemMessageW]
inc eax
neg eax
sbb eax, eax
and edi, eax
add esi, dword [ebp - 0x110]
test edi, edi
jne 0x181288bc
pop ebx
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
xor ecx, ebp
pop esi
call fcn.18141824
leave
ret 4

Function at 0x18129336
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, ecx
cmp byte [esi], 0
jne 0x181293ac
push edi
push dword [ebp + 8]
push dword [ebx + 4]
call dword [sym.imp.USER32.dll_GetDlgItem]
movzx ecx, byte [esi + 1]
mov edi, eax
neg ecx
sbb ecx, ecx
and ecx, 5
push ecx
push edi
call dword [sym.imp.USER32.dll_ShowWindow]
xor ecx, ecx
cmp byte [esi + 2], cl
setne cl
push ecx
push edi
call dword [sym.imp.USER32.dll_EnableWindow]
cmp byte [esi + 3], 0
je 0x181293ab
cmp byte [esi + 4], 0
je 0x181293ab
push 1
push edi
push 0x28
push dword [ebx + 4]
call dword [sym.imp.USER32.dll_SendMessageW]
push 0xfffffffffffffff0
push edi
call dword [sym.imp.USER32.dll_GetWindowLongW]
test eax, eax
je 0x181293ab
or eax, 1
push eax
push 0xfffffffffffffff0
push edi
call dword [sym.imp.USER32.dll_SetWindowLongW]
pop edi
pop esi
pop ebx
pop ebp
ret 8
Function at 0x1812999b
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, ecx
call fcn.1812910e
lea esi, [edi + 0x194]
xor ecx, ecx
mov edx, dword [esi]
inc ecx
mov ebx, 0x100
mov eax, dword [edx - 8]
sub ecx, dword [edx - 4]
sub eax, ebx
or eax, ecx
jge 0x181299cf
push ebx
mov ecx, esi
call fcn.18006ecd
mov edx, dword [esi]
push ebx
push edx
push dword [edi + 4]
call dword [sym.imp.USER32.dll_GetWindowTextW]
push 0xffffffffffffffff
mov ecx, esi
call fcn.18006b1a
push 1
mov ecx, edi
call fcn.1812a5d2
call fcn.18003fd3
push eax
lea ecx, [ebp - 4]
call fcn.18006df7
push 0xbdc
lea ecx, [ebp - 4]
call fcn.18006e20
lea eax, [ebp - 4]
mov ecx, edi
push eax
call fcn.1812a623
mov ecx, edi
call fcn.1812a59f
push 8
call fcn.18141eee
pop ecx
mov ecx, eax
call fcn.1801d5d5
mov ecx, dword [edi + 0x174]
mov dword [edi + 0x174], eax
pop edi
pop esi
pop ebx
test ecx, ecx
je 0x18129a45
push 8
push ecx
call fcn.18141b9d
pop ecx
pop ecx
mov ecx, dword [ebp - 4]
add ecx, 0xfffffff0
call fcn.18004637
xor eax, eax
inc eax
leave
ret 0x10
Function at 0x1812e19e
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x181c7008]
xor eax, ebp
mov dword [ebp - 4], eax
and dword [ebp - 0x10], 0
and dword [ebp - 0x14], 0
push ebx
push esi
push edi
mov ebx, edx
mov dword [ebp - 0xc], str.Microsoft_Enhanced_RSA_and_AES_Cryptographic_Provider
mov dword [ebp - 8], str.Microsoft_Enhanced_RSA_and_AES_Cryptographic_Provider__Prototype_
lea edi, [ebp - 0x10]
push 0xf0000040
push 0x18
push dword [edi]
lea eax, [ebp - 0x14]
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x1812e255
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x1812e1fa
movzx esi, si
or esi, 0x80070000
movzx ecx, byte [0x181cf83a]
neg ecx
sbb ecx, ecx
and ecx, 0x181cea00
je 0x1812e238
push 9
pop eax
push 0xfffffffffffffffe
pop edx
push edx
push eax
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], edx
call fcn.18005bab
push esi
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x24]
push str._CryptAcquireContext_failed___x_
push eax
call fcn.18004175
add esp, 0xc
add edi, 4
lea eax, [ebp - 4]
cmp edi, eax
jne 0x1812e1cc
cmp dword [ebp - 0x14], 0
je 0x1812e298
push 0
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
jmp 0x1812e298
movzx ecx, byte [0x181cf83a]
neg ecx
sbb ecx, ecx
and ecx, 0x181cea00
je 0x1812e291
push 9
pop esi
push 6
pop eax
push eax
push esi
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], eax
call fcn.18005bab
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x24]
push str._CryptAcquireContext_succeeded_
push eax
call fcn.18004175
pop ecx
pop ecx
mov eax, dword [ebp - 0x14]
xor esi, esi
mov dword [ebx], eax
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.18141824
leave
ret
Function at 0x1812f20e
Capabilities:
Read pipe
Write file on windows
Write pipe

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x88
push ebx
mov ebx, ecx
push esi
push edi
mov edi, dword [ebx + 0x24]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
sub esp, 0xc
lea edx, [ebx + 0x1c]
lea ecx, [ebx + 0x40]
mov esi, eax
lea eax, [ebx + 0x38]
push edx
push ecx
lea ecx, [ebx + 0x3c]
push ecx
push eax
push edi
push esi
push ecx
lea ecx, [ebp - 0x88]
call fcn.1812f0cf
xor esi, esi
lea eax, [ebp - 4]
push esi
push eax
push 0x2c
lea eax, [ebp - 0x30]
mov dword [ebp - 0x30], esi
push eax
push 0x2c
lea eax, [ebp - 0x88]
mov dword [ebp - 0x2c], esi
push eax
push dword [ebp + 8]
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x10], esi
mov dword [ebp - 0xc], esi
mov dword [ebp - 8], esi
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.dll_TransactNamedPipe]
test eax, eax
je 0x1812f301
cmp dword [ebp - 0x30], 2
jne 0x1812f301
cmp dword [ebp - 0x2c], esi
je 0x1812f301
cmp dword [ebp - 0x10], esi
je 0x1812f301
cmp dword [ebp - 0xc], esi
je 0x1812f301
cmp dword [ebp - 8], esi
je 0x1812f301
xor eax, eax
mov dword [ebp - 0x58], esi
mov dword [ebp - 0x54], esi
lea edi, [ebp - 0x48]
mov dword [ebp - 0x50], esi
mov dword [ebp - 0x4c], esi
stosd dword es:[edi], eax
push esi
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 4]
push eax
push 0x2c
lea eax, [ebp - 0x5c]
mov dword [ebp - 0x3c], esi
push eax
push dword [ebp + 8]
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x5c], 3
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1812f301
mov eax, dword [ebp - 0x10]
mov dword [ebx + 0x28], eax
mov eax, dword [ebp - 0xc]
mov dword [ebx + 0x2c], eax
mov eax, dword [ebp - 8]
mov dword [ebx + 0x30], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebx + 0x34], eax
mov al, 1
jmp 0x1812f303
xor al, al
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x18138fb6
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push 4
pop edx
movzx eax, cl
shr ecx, 8
xor ecx, dword [eax*4 + 0x181a01d0]
sub edx, 1
jne 0x18138fb9
mov eax, ecx
ret
Function at 0x1813e6d6
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, ecx
mov byte [ebp - 4], dl
push 1
lea edx, [ebp - 4]
mov ecx, dword [esi]
not ecx
call fcn.18138fce
mov ecx, dword [esi + 8]
lea edx, [ebp - 4]
not eax
not ecx
mov dword [esi], eax
movzx eax, al
add eax, dword [esi + 4]
imul eax, eax, 0x8088405
push 1
inc eax
mov dword [esi + 4], eax
shr eax, 0x18
mov byte [ebp - 4], al
call fcn.18138fce
pop ecx
not eax
pop ecx
mov dword [esi + 8], eax
pop esi
leave
ret

Function at 0x1813e721
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
mov eax, edx
mov dword [ebp - 4], ecx
xor edx, edx
mov dword [ebp - 0xc], eax
push esi
push edi
mov edi, edx
mov dword [ebp - 8], edx
cmp dword [ebp + 0x10], edx
jb 0x1813e7b5
ja 0x1813e745
cmp dword [ebp + 0xc], edx
jbe 0x1813e7b5
test eax, eax
je 0x1813e793
mov eax, dword [ebp + 8]
mov bl, byte [edi + eax]
mov ax, word [ecx + 8]
mov dl, bl
or ax, 2
movzx esi, ax
call fcn.1813e6d6
mov eax, esi
mov ecx, esi
xor ecx, 1
imul ecx, eax
mov eax, dword [ebp - 0xc]
shr ecx, 8
xor cl, bl
mov byte [edi + eax], cl
add edi, 1
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 4]
adc eax, 0
mov dword [ebp - 8], eax
cmp eax, dword [ebp + 0x10]
jb 0x1813e749
ja 0x1813e7b5
cmp edi, dword [ebp + 0xc]
jb 0x1813e749
jmp 0x1813e7b5
mov ebx, dword [ebp + 8]
mov esi, edx
mov dl, byte [esi + ebx]
call fcn.1813e6d6
mov ecx, dword [ebp - 4]
add esi, 1
adc edi, 0
cmp edi, dword [ebp + 0x10]
jb 0x1813e798
ja 0x1813e7b5
cmp esi, dword [ebp + 0xc]
jb 0x1813e798
pop edi
pop esi
pop ebx
leave
ret

Function at 0x1813e81d
Capabilities:
Create new key via cryptacquirecontext
Generate random numbers via winapi

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push 0xf0000040
push 0x18
push 0
push 0
lea eax, [ebp - 4]
mov esi, ecx
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x1813e860
push esi
push 0xb
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
test eax, eax
je 0x1813e860
push 0
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
test eax, eax
je 0x1813e860
mov al, 1
jmp 0x1813e862
xor al, al
pop esi
leave
ret
Function at 0x18155770
Capabilities:
Contain obfuscated stackstrings

Disassembly:
or al, 1
je 0x18155942
cmp dword [ebp + 0xc], 8
jne 0x1815590a
and byte [ebp - 0x6b8], 0
and byte [ebp - 0x6b7], 0
call fcn.18154a84
cmp dword [ebx - 0x6c], ecx
pop ebx
and byte [ebp - 0x544], 0
push 0
call dword [ebp - 0x340]
mov dword [ebp + 8], eax
push 0x104
lea eax, [ebp - 0x334]
push eax
push 0
call dword [ebp - 0x538]
call fcn.18154a84
jbe 0x18155946
fld qword [ecx]
and byte [ebp - 0x230], 0
push 0x40
pop ecx
xor eax, eax
lea edi, [ebp - 0x22f]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
and byte [ebp - 0x12c], 0
push 0x40
pop ecx
xor eax, eax
lea edi, [ebp - 0x12b]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
and byte [ebp - 0x654], 0
push 0x40
pop ecx
xor eax, eax
lea edi, [ebp - 0x653]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
and byte [ebp - 0x504], 0
push 0x40
pop ecx
xor eax, eax
lea edi, [ebp - 0x503]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
call fcn.18154a62
or byte [eax + 0x2ff845c6], ah
mov byte [ebp - 0x24], 0x34
and byte [ebp - 0x36c], 0
and byte [ebp - 0x36b], 0
mov byte [ebp - 0x36a], 0xaa
and byte [ebp - 0x369], 0
mov byte [ebp - 0x368], 0x12
mov byte [ebp - 0x367], 0x30
mov byte [ebp - 0x366], 0x21
mov byte [ebp - 0x365], 6
mov byte [ebp - 0x364], 0x2c
mov byte [ebp - 0x363], 0x26
mov byte [ebp - 0x362], 0x21
mov byte [ebp - 0x361], 0x30
mov byte [ebp - 0x360], 0x38
mov byte [ebp - 0x35f], 0x11
mov byte [ebp - 0x35e], 0x3c
mov byte [ebp - 0x35d], 0x27
mov byte [ebp - 0x35c], 0x30
mov byte [ebp - 0x35b], 0x36
mov byte [ebp - 0x35a], 0x21
mov byte [ebp - 0x359], 0x3a
mov byte [ebp - 0x358], 0x27
mov byte [ebp - 0x357], 0x2c
invalid
invalid
invalid

Function at 0x1815a8f4
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x181764c0
push 0x181764b8
push str.FlsAlloc
push 0x1e
call fcn.1815a761
mov esi, eax
add esp, 0x10
test esi, esi
je 0x1815a928
push dword [ebp + 8]
mov ecx, esi
call dword [0x18170908]
call esi
jmp 0x1815a92e
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x1815a972
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x181764d0
push 0x181764c8
push str.FlsGetValue
push 0x20
call fcn.1815a761
mov esi, eax
add esp, 0x10
test esi, esi
je 0x1815a9a9
push dword [ebp + 8]
mov ecx, esi
call dword [0x18170908]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]
Function at 0x1815c3ed
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x1815c48a
push ebx
push esi
call fcn.1815c3b6
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.1815c2ff
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x1815c437
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x1815c489
push edi
push eax
call fcn.18158db8
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x1815c457
call fcn.18157008
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x1815c488
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.1815c2ff
add esp, 0x20
test eax, eax
jne 0x1815c476
push edi
call fcn.18157008
jmp 0x1815c47e
push ebx
call fcn.18157008
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret

Function at 0x1815c48d
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x1815c49e
pop esi
ret
push ebx
push edi
push esi
call fcn.1815c3b6
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.18158db8
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x1815c4c6
push ebx
push esi
push edi
call fcn.18144bc0
add esp, 0xc
push 0
call fcn.18157008
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x1815c88a
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.1815c4db
Function at 0x181670a7
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
sar ecx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x181cd6a8]
mov dword [ebp - 0x10], ecx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x181670e7
cmp byte [ebx], 0xa
jne 0x181670e7
or byte [eax + edi + 0x28], 4
jmp 0x181670ec
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x181671ea
mov al, byte [edx]
cmp al, 0x1a
je 0x181671cc
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x1816711b
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x18167140
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x1816714a
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add edx, eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov ecx, dword [ebp - 0xc]
inc esi
cmp edx, ecx
jb 0x181670fd
jmp 0x181671ea
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x181671c7
cmp dword [ebp - 0xc], 0
je 0x181671c7
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x181cd6a8]
test byte [eax + edi + 0x28], 0x48
je 0x181671a1
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x1816718c
mov byte [esi], dl
jmp 0x1816719d
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x181cd6a8]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x181671ea
cmp byte [ebp - 1], 0xa
jne 0x181671b0
cmp esi, ebx
jne 0x181671b0
mov byte [esi], 0xa
jmp 0x181671e9
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.18166f50
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x181671ea
mov byte [esi], 0xd
jmp 0x181671e9
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x181cd6a8]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x181671e6
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x181671ea
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret