joyce8/EMBER2024-capa huggingface dataset:
Function at 0x519a50
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x2c
mov eax, dword [esp + 0x34]
test eax, eax
push ebx
mov ebx, 0xb
cmovne ebx, eax
mov dword [esp + 0x18], ebx
push esi
cmp ebx, 5
jb 0x519c6a
cmp ebx, 0xc
jbe 0x519a80
pop esi
mov eax, 0xffffffd4
pop ebx
add esp, 0x2c
ret
mov eax, dword [esp + 0x48]
mov esi, dword [esp + 0x44]
bsr eax, eax
bsr ecx, esi
add eax, 2
inc ecx
cmp ecx, eax
cmovb eax, ecx
cmp ebx, eax
jb 0x519c6a
push ebp
xor eax, eax
mov ebp, 0x3e
cmp dword [esp + 0x50], eax
push edi
sete al
sub ebp, ebx
push 0
push esi
push 0x40000000
lea eax, [eax*2 - 1]
mov dword [esp + 0x24], ebp
movzx eax, ax
push 0
mov dword [esp + 0x30], eax
call fcn.0052c2b0
xor ecx, ecx
mov dword [esp + 0x28], edx
xor edx, edx
mov dword [esp + 0x2c], eax
lea eax, [ebp - 0x14]
mov dword [esp + 0x14], 0
bts ecx, eax
mov ebp, 1
cmp eax, 0x20
cmovae edx, ecx
xor ecx, edx
cmp eax, 0x40
mov eax, dword [esp + 0x50]
cmovae edx, ecx
mov dword [esp + 0x34], ecx
mov ecx, ebx
mov dword [esp + 0x30], edx
mov edx, esi
shl ebp, cl
shr edx, cl
xor edi, edi
mov ecx, dword [esp + 0x48]
xor ebx, ebx
mov dword [esp + 0x1c], edi
mov dword [esp + 0x38], edx
mov ecx, dword [ecx + ebx*4]
cmp ecx, esi
je 0x519c60
test ecx, ecx
jne 0x519b39
xor edx, edx
jmp 0x519bef
cmp ecx, edx
ja 0x519b4a
mov ecx, dword [esp + 0x20]
dec ebp
movzx edx, cx
jmp 0x519bef
mov eax, dword [esp + 0x28]
mul ecx
mov esi, eax
mov eax, dword [esp + 0x2c]
mul ecx
mov ecx, dword [esp + 0x18]
add esi, edx
mov dword [esp + 0x10], eax
mov edx, esi
mov dword [esp + 0x44], esi
call fcn.0052c220
movzx esi, ax
cmp si, 8
jge 0x519bc1
mov ecx, dword [esp + 0x18]
movsx edi, si
mov eax, edi
cdq
call fcn.0052c200
sub dword [esp + 0x10], eax
mov ecx, dword [edi*4 + 0x5a7620]
sbb dword [esp + 0x44], edx
mov eax, dword [esp + 0x30]
mul ecx
mov edi, eax
mov eax, dword [esp + 0x34]
mul ecx
add edi, edx
cmp dword [esp + 0x44], edi
jb 0x519bb9
ja 0x519bb2
cmp dword [esp + 0x10], eax
jbe 0x519bb9
mov eax, 1
jmp 0x519bbb
xor eax, eax
mov edi, dword [esp + 0x1c]
add esi, eax
movsx eax, si
sub ebp, eax
movzx ecx, si
cmp si, di
movzx edx, si
mov esi, dword [esp + 0x4c]
mov eax, ebx
cmovle eax, dword [esp + 0x14]
mov dword [esp + 0x14], eax
movzx eax, di
cmovle ecx, eax
mov eax, dword [esp + 0x50]
movzx edi, cx
mov dword [esp + 0x1c], edi
mov ecx, dword [esp + 0x40]
mov word [ecx + ebx*2], dx
inc ebx
mov edx, dword [esp + 0x38]
mov ecx, dword [esp + 0x48]
cmp ebx, eax
jbe 0x519b23
mov ecx, dword [esp + 0x14]
mov eax, ebp
mov ebx, dword [esp + 0x40]
neg eax
movzx edi, word [ebx + ecx*2]
lea edx, [ebx + ecx*2]
movsx ecx, di
sar ecx, 1
cmp eax, ecx
jl 0x519c4c
push dword [esp + 0x20]
push dword [esp + 0x54]
push esi
push dword [esp + 0x54]
mov esi, dword [esp + 0x34]
push esi
push ebx
call fcn.00519c80
add esp, 0x18
cmp eax, 0xffffff88
jbe 0x519c56
pop edi
pop ebp
pop esi
pop ebx
add esp, 0x2c
ret
mov esi, dword [esp + 0x24]
lea ecx, [edi + ebp]
mov word [edx], cx
pop edi
pop ebp
mov eax, esi
pop esi
pop ebx
add esp, 0x2c
ret
pop edi
pop ebp
pop esi
xor eax, eax
pop ebx
add esp, 0x2c
ret
pop esi
or eax, 0xffffffff
pop ebx
add esp, 0x2c
ret
Function at 0x51c260
Capabilities:
Encode data using xor

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push ebp
mov ebp, dword [esp + 0x18]
push esi
mov esi, dword [esp + 0x14]
and ebp, 0x1f
push edi
mov edi, dword [esp + 0x1c]
cmp ebp, 8
jb 0x51c2fd
mov eax, ebp
shr eax, 3
mov dword [esp + 0x20], eax
nop dword [eax]
push 0xc2b2ae3d
push 0x27d4eb4f
push dword [edi + 4]
push dword [edi]
call fcn.0052c240
mov ecx, eax
add edi, 8
push 0x9e3779b1
shld ecx, edx, 0x1f
shld edx, eax, 0x1f
push 0x85ebca87
push edx
push ecx
call fcn.0052c240
mov ecx, eax
xor edx, esi
xor ecx, ebx
mov eax, ecx
push 0x9e3779b1
shld eax, edx, 0x1b
shld edx, ecx, 0x1b
push 0x85ebca87
push edx
push eax
call fcn.0052c240
mov ebx, eax
mov esi, edx
add ebx, 0xc2b2ae63
adc esi, 0x85ebca77
sub ebp, 8
sub dword [esp + 0x20], 1
jne 0x51c290
mov ecx, edi
cmp ebp, 4
jb 0x51c353
mov eax, 0x9e3779b1
add edi, 4
mul dword [ecx]
mov dword [esp + 0x20], edi
mov edi, eax
mov eax, 0x85ebca87
mul dword [ecx]
push 0xc2b2ae3d
add edi, edx
xor eax, ebx
xor edi, esi
mov ecx, eax
shld ecx, edi, 0x17
shld edi, eax, 0x17
push 0x27d4eb4f
push edi
push ecx
call fcn.0052c240
mov edi, dword [esp + 0x20]
mov ebx, eax
add ebx, 0x9e3779f9
mov esi, edx
adc esi, 0x165667b1
sub ebp, 4
test ebp, ebp
je 0x51c397
movzx eax, byte [edi]
push 0x27d4eb2f
cdq
push 0x165667c5
push edx
push eax
call fcn.0052c240
xor ebx, eax
lea edi, [edi + 1]
xor esi, edx
mov eax, ebx
push 0x9e3779b1
shld eax, esi, 0xb
push 0x85ebca87
shld esi, ebx, 0xb
push esi
push eax
call fcn.0052c240
mov ebx, eax
mov esi, edx
sub ebp, 1
jne 0x51c357
push 0xc2b2ae3d
xor ecx, ecx
mov edi, esi
push 0x27d4eb4f
xor ecx, esi
shr edi, 1
push ecx
xor edi, ebx
push edi
call fcn.0052c240
mov esi, eax
mov ecx, edx
shrd esi, ecx, 0x1d
push 0x165667b1
shr ecx, 0x1d
xor esi, eax
push 0x9e3779f9
xor ecx, edx
push ecx
push esi
call fcn.0052c240
xor esi, esi
mov ecx, edx
pop edi
xor edx, esi
xor eax, ecx
pop esi
pop ebp
pop ebx
ret
Function at 0x52ac00
Capabilities:
Create thread

Disassembly:
sub esp, 0x28
mov eax, dword [esp + 0x34]
push esi
mov esi, dword [esp + 0x30]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 8], eax
lea eax, [esp + 0x10]
push eax
mov dword [esp + 0x10], 0
mov dword [esi], 0
call dword [sym.imp.KERNEL32.dll_InitializeConditionVariable]
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0
push 0
lea eax, [esp + 0xc]
push eax
push 0x52acf0
push 0
push 0
call fcn.0053a902
add esp, 0x18
mov dword [esi], eax
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0xc], 0
jne 0x52ac85
mov esi, dword [sym.imp.KERNEL32.dll_SleepConditionVariableCS]
push 0xffffffffffffffff
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x18]
push eax
call esi
cmp dword [esp + 0xc], 0
je 0x52ac70
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
xor eax, eax
pop esi
add esp, 0x28
ret

Function at 0x53bd18
Capabilities:
Get disk information

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x5d60c4]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
push 0x5adee8
push esi
call fcn.0054f566
pop ecx
pop ecx
test eax, eax
jne 0x53bd46
xor al, al
jmp 0x53bdc3
push ebx
lea eax, [ebp - 0x210]
xor ebx, ebx
push eax
push 0x104
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x210], ebx
push esi
push eax
call fcn.0053ba5b
mov edx, eax
add esp, 0x10
test edx, edx
jne 0x53bd80
push dword [ebp - 0x210]
call fcn.0052fd09
xor al, al
jmp 0x53bdc1
mov ecx, edx
push edi
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x53bd86
sub ecx, edi
sar ecx, 1
pop edi
cmp ecx, 3
je 0x53bda6
push edx
call fcn.0053bc4e
pop ecx
test al, al
je 0x53bd71
push esi
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x53bdb4
mov bl, 1
push dword [ebp - 0x210]
call fcn.0052fd09
mov al, bl
pop ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0052b789
leave
ret
Function at 0x5432ad
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 + 0x5d89c0]
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 0x5432ed
cmp byte [ebx], 0xa
jne 0x5432ed
or byte [eax + edi + 0x28], 4
jmp 0x5432f2
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x5433f0
mov al, byte [edx]
cmp al, 0x1a
je 0x5433d2
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x543321
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x543346
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x543350
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 0x543303
jmp 0x5433f0
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 0x5433cd
cmp dword [ebp - 0xc], 0
je 0x5433cd
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x5d89c0]
test byte [eax + edi + 0x28], 0x48
je 0x5433a7
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x543392
mov byte [esi], dl
jmp 0x5433a3
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x5d89c0]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x5433f0
cmp byte [ebp - 1], 0xa
jne 0x5433b6
cmp esi, ebx
jne 0x5433b6
mov byte [esi], 0xa
jmp 0x5433ef
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00544286
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x5433f0
mov byte [esi], 0xd
jmp 0x5433ef
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x5d89c0]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x5433ec
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x5433f0
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x5433f9
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, eax
and eax, 0x3f
sar ebx, 6
push edi
imul edi, eax, 0x38
push 0xa
mov eax, dword [ebx*4 + 0x5d89c0]
pop edx
mov dword [ebp - 0x14], edx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x54343c
cmp word [esi], dx
jne 0x54343c
or byte [edi + eax + 0x28], 4
jmp 0x543441
and byte [edi + eax + 0x28], 0xfb
lea edx, [esi + ecx*2]
mov eax, esi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
cmp eax, edx
jae 0x543594
mov dword [ebp - 0xc], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x10], edx
push 0x1a
pop edx
cmp cx, dx
mov edx, dword [ebp - 8]
je 0x543574
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x543483
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x5434b9
cmp eax, edx
jae 0x5434c5
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x14]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 8]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
add esi, 2
cmp eax, edx
jb 0x54345b
jmp 0x543594
push 0
lea eax, [ebp - 0x14]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x543570
cmp dword [ebp - 0x14], 0
je 0x543570
mov eax, dword [ebx*4 + 0x5d89c0]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x543548
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x543511
mov word [esi], cx
jmp 0x543544
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x5d89c0]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x5d89c0]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x5d89c0]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x543594
pop ebx
cmp word [ebp - 4], bx
jne 0x543559
cmp esi, dword [ebp + 0xc]
jne 0x543559
mov word [esi], bx
jmp 0x543591
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00544286
add esp, 0x10
cmp word [ebp - 4], bx
je 0x543594
push 0xd
jmp 0x54358d
mov ecx, dword [ebx*4 + 0x5d89c0]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x54358b
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x543594
push 0x1a
pop eax
mov word [esi], ax
add esi, 2
sub esi, dword [ebp + 0xc]
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x549003
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.0052c280
mov eax, dword [0x5d60c4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push dword [ebp + 8]
mov dword [ebp - 0x100c], eax
call fcn.005425a4
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x549045
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x5491a1
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.00564570
push dword [ebp - 0x100c]
mov ecx, ebx
mov dword [ebp - 0x1008], eax
mov esi, ebx
mov dword [ebp - 0x1018], edx
and ecx, 0x3f
sar esi, 6
imul edi, ecx, 0x38
push 0
mov eax, dword [esi*4 + 0x5d89c0]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.00544268
mov ecx, dword [esi*4 + 0x5d89c0]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [edi + ecx + 0x20]
jne 0x54919a
cmp eax, dword [edi + ecx + 0x24]
jne 0x54919a
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [edi + ecx + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x54919a
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00544268
add esp, 0x14
test edx, edx
jl 0x54919a
jg 0x549110
test eax, eax
jb 0x54919a
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x54919a
jl 0x54912a
cmp dword [ebp - 0x1008], eax
ja 0x54919a
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x549148
test ebx, ebx
je 0x549181
cmp ecx, edi
jae 0x549181
mov al, byte [ecx]
cmp al, 0xd
jne 0x549162
lea eax, [edi - 1]
cmp ecx, eax
jae 0x54916e
cmp byte [ecx + 1], 0xa
jne 0x54916e
inc ecx
jmp 0x54916e
movzx eax, al
movsx eax, byte [eax + 0x5d61c0]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x549148
cmp edx, ebx
jne 0x549148
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x54919f
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.0052b789
leave
ret

Function at 0x54d4a5
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x5b023c
push 0x5b0234
push str.FlsAlloc
push 0x1e
call fcn.0054d2d2
mov esi, eax
add esp, 0x10
test esi, esi
je 0x54d4d9
push dword [ebp + 8]
mov ecx, esi
call dword [0x56a7f4]
call esi
jmp 0x54d4df
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x54d523
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x5b024c
push 0x5b0244
push str.FlsGetValue
push 0x20
call fcn.0054d2d2
mov esi, eax
add esp, 0x10
test esi, esi
je 0x54d55a
push dword [ebp + 8]
mov ecx, esi
call dword [0x56a7f4]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]
Function at 0x5507de
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00550305

Function at 0x550ecd
Capabilities:
Clear file content

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
push esi
push edi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00550e49
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x551045
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x551045
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x550ff4
jg 0x550f26
test eax, eax
je 0x550fea
push 1
push 0x1000
call fcn.0054efc3
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x550f4c
mov eax, dword [ebp + 0x14]
push 0xc
pop edi
mov byte [eax + 0x1c], 1
mov dword [eax + 0x18], edi
jmp 0x550fe1
push 0x8000
push ebx
call fcn.00546c17
mov edi, dword [ebp + 0x14]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x550f78
jg 0x550f73
cmp ecx, 0x1000
jb 0x550f78
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.005423a4
add esp, 0x10
cmp eax, 0xffffffff
je 0x550fbd
mov ecx, dword [ebp - 4]
cdq
sub ecx, eax
mov eax, dword [ebp - 8]
mov dword [ebp - 4], ecx
sbb eax, edx
mov dword [ebp - 8], eax
test eax, eax
jg 0x550f73
jl 0x550fa4
test ecx, ecx
jne 0x550f65
push dword [ebp - 0xc]
push ebx
call fcn.00546c17
push esi
call fcn.0054c87e
add esp, 0xc
xor edi, edi
jmp 0x551056
cmp byte [edi + 0x24], 0
je 0x550fd4
cmp dword [edi + 0x20], 5
jne 0x550fd4
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x550fdf
mov edi, dword [edi + 0x18]
jmp 0x550fe1
xor edi, edi
push esi
call fcn.0054c87e
pop ecx
jmp 0x551056
test ecx, ecx
jg 0x550fb6
jl 0x550ff4
test eax, eax
jae 0x550fb6
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00544286
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x551017
mov edi, dword [ebp + 0x14]
cmp byte [edi + 0x1c], 0
je 0x550fb6
jmp 0x55104e
push ebx
call fcn.005446e9
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x550fb6
mov esi, dword [ebp + 0x14]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [esi + 0x24], 1
mov dword [esi + 0x20], eax
pop edi
mov byte [esi + 0x1c], 1
mov dword [esi + 0x18], edi
jmp 0x551056
mov edi, dword [ebp + 0x14]
cmp byte [edi + 0x1c], 0
je 0x551053
mov edi, dword [edi + 0x18]
jmp 0x551056
push 0x16
pop edi
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.00544286
add esp, 0x10
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret

Function at 0x551390
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00551201
Function at 0x5525af
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 0x55264c
push ebx
push esi
call fcn.00552578
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.0054cb35
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x5525f9
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x55264b
push edi
push eax
call fcn.0054cfc4
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x552619
call fcn.0054c87e
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x55264a
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.0054cb35
add esp, 0x20
test eax, eax
jne 0x552638
push edi
call fcn.0054c87e
jmp 0x552640
push ebx
call fcn.0054c87e
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 0x55264f
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x552660
pop esi
ret
push ebx
push edi
push esi
call fcn.00552578
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.0054cfc4
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x552688
push ebx
push esi
push edi
call fcn.0052d430
add esp, 0xc
push 0
call fcn.0054c87e
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x55bec0
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
mov eax, dword [esp + 0xc]
push ebx
mov ebx, dword [esp + 8]
not eax
push esi
mov esi, dword [esp + 0x10]
push edi
cmp esi, 8
jbe 0x55bf96
test bl, 7
je 0x55bef9
nop
movzx ecx, byte [ebx]
dec esi
movzx edx, al
inc ebx
xor edx, ecx
shr eax, 8
xor eax, dword [edx*4 + 0x5b3330]
test bl, 7
jne 0x55bee0
mov edi, esi
and esi, 7
and edi, 0xfffffff8
add edi, ebx
cmp ebx, edi
jae 0x55bf96
nop dword [eax + eax]
xor eax, dword [ebx]
add ebx, 4
mov dword [esp + 0x18], ebx
add dword [esp + 0x18], 4
mov ebx, dword [ebx]
mov ecx, ebx
shr ecx, 0x10
movzx edx, cl
mov ecx, ebx
shr ecx, 8
movzx ecx, cl
mov edx, dword [edx*4 + 0x5b3730]
xor edx, dword [ecx*4 + 0x5b3b30]
mov ecx, eax
shr ecx, 0x10
movzx ecx, cl
xor edx, dword [ecx*4 + 0x5b4730]
mov ecx, eax
shr ecx, 8
movzx ecx, cl
xor edx, dword [ecx*4 + 0x5b4b30]
mov ecx, ebx
shr ecx, 0x18
xor edx, dword [ecx*4 + 0x5b3330]
mov ecx, eax
shr ecx, 0x18
movzx eax, al
xor edx, dword [ecx*4 + 0x5b4330]
movzx ecx, bl
mov ebx, dword [esp + 0x18]
xor edx, dword [ecx*4 + 0x5b3f30]
xor edx, dword [eax*4 + 0x5b4f30]
mov eax, edx
cmp ebx, edi
jb 0x55bf10
test esi, esi
je 0x55bfba
nop word [eax + eax]
movzx ecx, byte [ebx]
lea ebx, [ebx + 1]
movzx edx, al
xor edx, ecx
shr eax, 8
xor eax, dword [edx*4 + 0x5b3330]
sub esi, 1
jne 0x55bfa0
pop edi
pop esi
not eax
pop ebx
ret
Function at 0x55e0d0
Capabilities:
Encode data using xor

Disassembly:
push ebx
mov ebx, dword [esp + 0x10]
push esi
mov esi, dword [esp + 0xc]
push edi
mov eax, dword [esi + 0x1e4]
mov edx, dword [esi + 0xa94]
add eax, 0x355
and edx, dword [esp + 0x20]
shl eax, 4
add eax, edx
lea ecx, [esi + eax*2]
mov eax, dword [esi + 0x20]
cmp ebx, 0xffffffff
jne 0x55e23b
mov ebx, dword [esp + 0x14]
mov dword [esi + eax*4 + 0x28], 0
mov eax, dword [esi + 0x20]
push ebp
mov dword [esi + eax*4 + 0xfc], ecx
mov ebp, dword [esi + 0x20]
inc ebp
mov dword [esi + 0x20], ebp
mov edi, dword [ebx]
mov eax, edi
mov edx, dword [ebx + 0x18]
sub eax, edx
mov ecx, dword [ebx + 0x14]
mov dword [esp + 0x14], edx
movzx edx, byte [eax + ecx - 1]
mov ecx, 8
sub cl, byte [esi + 0xa98]
mov eax, dword [esi + 0xa9c]
and eax, dword [esp + 0x24]
shr edx, cl
mov ecx, dword [esi + 0xa98]
shl eax, cl
lea ecx, [esi + 0xaa0]
add edx, eax
imul eax, edx, 0x600
mov edx, dword [ebx + 0x14]
add ecx, eax
mov eax, edi
sub eax, dword [ebx + 0x18]
cmp dword [esi + 0x1e4], 7
mov dword [esp + 0x24], ecx
movzx edx, byte [eax + edx]
jge 0x55e18e
push edx
push 8
push ecx
push esi
call fcn.0055f3b0
add esp, 0x10
jmp 0x55e1ef
sub edi, dword [esi + 0x1e8]
sub edi, dword [esp + 0x14]
mov eax, dword [ebx + 0x14]
mov ebx, 0x100
add edx, ebx
movzx edi, byte [edi + eax - 1]
mov eax, edx
add edi, edi
shr eax, 7
mov ecx, ebx
and eax, 1
and ecx, edi
mov dword [esi + ebp*4 + 0x28], eax
add ecx, ebx
mov eax, edx
add edx, edx
shr eax, 8
add eax, ecx
mov ecx, dword [esp + 0x24]
lea ecx, [ecx + eax*2]
mov eax, dword [esi + 0x20]
mov dword [esi + eax*4 + 0xfc], ecx
mov eax, edi
inc dword [esi + 0x20]
xor eax, edx
mov ebp, dword [esi + 0x20]
not eax
and ebx, eax
cmp edx, 0x10000
jb 0x55e1a7
mov ebx, dword [esp + 0x18]
mov eax, dword [esi + 0x1e4]
pop ebp
cmp eax, 3
jg 0x55e20e
xor eax, eax
mov dword [esi + 0x1e4], eax
mov eax, dword [esp + 0x1c]
sub dword [ebx + 0x18], eax
pop edi
pop esi
pop ebx
ret
cmp eax, 9
jg 0x55e227
add eax, 0xfffffffd
mov dword [esi + 0x1e4], eax
mov eax, dword [esp + 0x1c]
sub dword [ebx + 0x18], eax
pop edi
pop esi
pop ebx
ret
add eax, 0xfffffffa
mov dword [esi + 0x1e4], eax
mov eax, dword [esp + 0x1c]
sub dword [ebx + 0x18], eax
pop edi
pop esi
pop ebx
ret
mov edi, dword [esp + 0x1c]
mov dword [esi + eax*4 + 0x28], 1
mov eax, dword [esi + 0x20]
push edi
mov dword [esi + eax*4 + 0xfc], ecx
mov eax, dword [esi + 0x20]
inc eax
mov dword [esi + 0x20], eax
mov ecx, dword [esi + 0x1e4]
add ecx, 0x3610
lea eax, [esi + eax*4]
lea ecx, [esi + ecx*2]
cmp ebx, 4
jae 0x55e29a
mov dword [eax + 0x28], 1
mov eax, dword [esi + 0x20]
push ebx
push edx
push esi
mov dword [esi + eax*4 + 0xfc], ecx
inc dword [esi + 0x20]
call fcn.0055f6d0
mov eax, dword [esp + 0x24]
add esp, 0x10
sub dword [eax + 0x18], edi
pop edi
pop esi
pop ebx
ret
mov dword [eax + 0x28], 0
mov eax, dword [esi + 0x20]
mov dword [esi + eax*4 + 0xfc], ecx
lea eax, [ebx - 4]
inc dword [esi + 0x20]
push eax
push edx
push esi
call fcn.0055f260
mov eax, dword [esp + 0x24]
add esp, 0x10
sub dword [eax + 0x18], edi
pop edi
pop esi
pop ebx
ret