joyce8/EMBER2024-capa huggingface dataset:
Function at 0x48e410
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
mov ecx, dword [ebp + 8]
push ebx
push esi
push edi
mov eax, dword [ecx]
mov ebx, dword [ecx + 8]
mov edi, dword [ecx + 0xc]
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], eax
mov eax, dword [ecx + 4]
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 8], 0
movups xmm0, xmmword [ecx]
movups xmmword [ebp - 0x50], xmm0
movups xmm0, xmmword [ecx + 0x10]
movups xmmword [ebp - 0x40], xmm0
movups xmm0, xmmword [ecx + 0x20]
movups xmmword [ebp - 0x30], xmm0
movups xmm0, xmmword [ecx + 0x30]
movups xmmword [ebp - 0x20], xmm0
mov esi, eax
mov dword [ebp + 0xc], eax
mov ecx, ebx
not esi
and ecx, eax
and esi, edi
or esi, ecx
mov edx, edi
mov ecx, dword [ebp - 8]
mov edi, ebx
mov ebx, dword [ebp - 8]
mov ecx, dword [ecx + 0x4c95c0]
add ecx, dword [ebp + ebx - 0x50]
add ecx, esi
add ecx, dword [ebp - 4]
rol ecx, 7
add eax, ecx
mov dword [ebp - 4], edx
mov ecx, ebx
mov ebx, dword [ebp + 0xc]
add ecx, 4
mov dword [ebp - 8], ecx
cmp ecx, 0x40
jb 0x48e456
mov dword [ebp - 0xc], 0x4c9600
mov dword [ebp - 8], 0x51
mov esi, edi
mov dword [ebp + 0xc], eax
not esi
mov ecx, edi
and ecx, eax
and esi, ebx
or esi, ecx
mov edx, edi
mov ecx, dword [ebp - 8]
mov edi, ebx
mov ebx, dword [ebp - 0xc]
and ecx, 0xf
add dword [ebp - 0xc], 4
mov ecx, dword [ebp + ecx*4 - 0x50]
add ecx, dword [ebx]
mov ebx, dword [ebp + 0xc]
add ecx, esi
add ecx, dword [ebp - 4]
rol ecx, 0xc
add eax, ecx
mov dword [ebp - 4], edx
mov ecx, dword [ebp - 8]
add ecx, 5
mov dword [ebp - 8], ecx
cmp ecx, 0xa1
jb 0x48e4a4
mov ecx, 0x65
mov dword [ebp - 0xc], 0x4c9640
mov dword [ebp - 8], ecx
nop word [eax + eax]
and ecx, 0xf
mov dword [ebp + 0xc], eax
mov edx, edi
mov esi, edi
xor edx, ebx
mov edi, ebx
mov ebx, dword [ebp - 0xc]
xor edx, eax
mov ecx, dword [ebp + ecx*4 - 0x50]
add dword [ebp - 0xc], 4
add ecx, dword [ebx]
mov ebx, dword [ebp + 0xc]
add ecx, edx
add ecx, dword [ebp - 4]
ror ecx, 0xf
add eax, ecx
mov dword [ebp - 4], esi
mov ecx, dword [ebp - 8]
add ecx, 3
mov dword [ebp - 8], ecx
cmp ecx, 0x95
jb 0x48e500
mov ecx, 0x150
mov dword [ebp + 0xc], 0xc0
mov dword [ebp - 0xc], ecx
nop dword [eax]
add dword [ebp - 0xc], 7
and ecx, 0xf
mov edx, edi
mov dword [ebp - 8], edi
mov edi, dword [ebp + 0xc]
not edx
or edx, eax
mov dword [ebp - 4], ebx
mov ecx, dword [ebp + ecx*4 - 0x50]
xor edx, ebx
mov ebx, eax
add ecx, dword [edi + 0x4c95c0]
add ecx, edx
mov edx, dword [ebp - 8]
add ecx, esi
mov esi, edx
ror ecx, 0xa
add eax, ecx
mov ecx, edi
mov edi, dword [ebp - 4]
add ecx, 4
mov dword [ebp + 0xc], ecx
cmp ecx, 0x100
mov ecx, dword [ebp - 0xc]
jb 0x48e550
mov ecx, dword [ebp - 0x10]
add ecx, edx
mov edx, dword [ebp + 8]
add dword [edx + 8], ebx
add dword [edx + 4], eax
add dword [edx + 0xc], edi
pop edi
pop esi
mov dword [edx], ecx
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x48e840
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6c
push esi
push edi
mov edi, dword [ebp + 8]
cmp dword [edi + 0x14], 0x10
mov esi, dword [edi + 0x10]
jb 0x48e85a
add esi, dword [edi]
mov edi, dword [edi]
jmp 0x48e85c
add esi, edi
mov eax, esi
mov dword [ebp - 0x28], 0
sub eax, edi
mov dword [ebp - 0x18], 0
push eax
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x14], 7
call fcn.00494880
mov byte [ebp + 8], 0
lea ecx, [ebp - 0x28]
push dword [ebp + 8]
push esi
push edi
call fcn.0048a600
cmp dword [ebp - 0x14], 8
lea ecx, [ebp - 0x10]
push ecx
lea ecx, [ebp - 0x6c]
mov dword [ebp - 0x6c], 0x44
push ecx
push 0
push 0
push 0
push 0
xorps xmm0, xmm0
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push 0
push 0
push 0
push eax
movlpd qword [ebp - 0x68], xmm0
movlpd qword [ebp - 0x60], xmm0
movlpd qword [ebp - 0x58], xmm0
movlpd qword [ebp - 0x50], xmm0
movlpd qword [ebp - 0x48], xmm0
movlpd qword [ebp - 0x40], xmm0
movlpd qword [ebp - 0x38], xmm0
movlpd qword [ebp - 0x30], xmm0
movups xmmword [ebp - 0x10], xmm0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x48e905
push dword [ebp - 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0xc]
call esi
xor esi, esi
jmp 0x48e90a
mov esi, 1
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x48e940
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x48e936
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x48e948
push edx
push ecx
call fcn.004a06de
add esp, 8
pop edi
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret
call fcn.004a514f
int3
Function at 0x492e60
Capabilities:
Encode data using xor
Hash data using fnv

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 0xc]
mov edx, 0x811c9dc5
push edi
mov edi, dword [ebp + 8]
mov ecx, 0
sub esi, edi
je 0x492e91
nop dword [eax]
movzx eax, byte [ecx + edi]
inc ecx
xor eax, edx
imul edx, eax, 0x1000193
cmp ecx, esi
jb 0x492e80
pop edi
mov eax, edx
pop esi
pop ebp
ret 8

Function at 0x493b40
Capabilities:
Encode data using xor
Get hostname

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push esi
lea eax, [ebp - 8]
mov dword [ebp - 8], 0x10
push eax
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_GetComputerNameA]
test eax, eax
je 0x493b9c
mov esi, dword [ebp + 8]
lea ecx, [ebp - 0x18]
lea edx, [ecx + 1]
mov dword [esi], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0xf
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x493b80
sub ecx, edx
lea eax, [ebp - 0x18]
push ecx
push eax
mov ecx, esi
call fcn.00401820
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret
cmp byte [0x4c981b], 0
mov eax, dword [0x4c9818]
mov dword [ebp - 4], eax
je 0x493c71
xor ecx, ecx
cmp dword [0x4dcc20], 2
jl 0x493c50
movaps xmm3, xmmword [0x4c0630]
mov ecx, 4
movaps xmm2, xmm3
movaps xmm0, xmm3
punpckhdq xmm0, xmm3
pmuldq xmm0, xmmword [0x4ca210]
punpckldq xmm2, xmm3
pmuldq xmm2, xmmword [0x4ca210]
shufps xmm2, xmm0, 0xdd
movd xmm0, ecx
mov ecx, 0x1f
psrad xmm2, xmm0
movaps xmm1, xmm2
movd xmm0, ecx
psrld xmm1, xmm0
paddd xmm1, xmm2
pmulld xmm1, xmmword [str.1111]
psubd xmm3, xmm1
pshuflw xmm0, xmm3, 0xd8
pshufhw xmm0, xmm0, 0xd8
pshufd xmm1, xmm0, 0xd8
pand xmm1, xmmword [0x4c06b0]
packuswb xmm1, xmm1
paddb xmm1, xmmword [str.6666666666666666]
movd xmm0, eax
pxor xmm1, xmm0
movd dword [ebp - 4], xmm1
jmp 0x493c71
mov eax, 0x5397829d
mul ecx
shr edx, 4
movsx eax, dl
mov dl, cl
imul eax, eax, 0x31
sub dl, al
add dl, 0x36
xor byte [ebp + ecx - 4], dl
inc ecx
cmp ecx, 4
jl 0x493c50
mov esi, dword [ebp + 8]
lea ecx, [ebp - 4]
lea edx, [ecx + 1]
mov dword [esi], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0xf
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x493c90
sub ecx, edx
lea eax, [ebp - 4]
push ecx
push eax
mov ecx, esi
call fcn.00401820
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x493cb0
Capabilities:
Encode data using xor
Get session user name

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push esi
lea eax, [ebp - 8]
mov dword [ebp - 8], 0x41
push eax
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
test eax, eax
je 0x493d0c
mov esi, dword [ebp + 8]
lea ecx, [ebp - 0x4c]
lea edx, [ecx + 1]
mov dword [esi], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0xf
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x493cf0
sub ecx, edx
lea eax, [ebp - 0x4c]
push ecx
push eax
mov ecx, esi
call fcn.00401820
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret
cmp byte [0x4c981f], 0
mov eax, dword [0x4c981c]
mov dword [ebp - 4], eax
je 0x493de1
xor ecx, ecx
cmp dword [0x4dcc20], 2
jl 0x493dc0
movaps xmm3, xmmword [0x4c0630]
mov ecx, 4
movaps xmm2, xmm3
movaps xmm0, xmm3
punpckhdq xmm0, xmm3
pmuldq xmm0, xmmword [0x4ca210]
punpckldq xmm2, xmm3
pmuldq xmm2, xmmword [0x4ca210]
shufps xmm2, xmm0, 0xdd
movd xmm0, ecx
mov ecx, 0x1f
psrad xmm2, xmm0
movaps xmm1, xmm2
movd xmm0, ecx
psrld xmm1, xmm0
paddd xmm1, xmm2
pmulld xmm1, xmmword [str.1111]
psubd xmm3, xmm1
pshuflw xmm0, xmm3, 0xd8
pshufhw xmm0, xmm0, 0xd8
pshufd xmm1, xmm0, 0xd8
pand xmm1, xmmword [0x4c06b0]
packuswb xmm1, xmm1
paddb xmm1, xmmword [str.6666666666666666]
movd xmm0, eax
pxor xmm1, xmm0
movd dword [ebp - 4], xmm1
jmp 0x493de1
mov eax, 0x5397829d
mul ecx
shr edx, 4
movsx eax, dl
mov dl, cl
imul eax, eax, 0x31
sub dl, al
add dl, 0x36
xor byte [ebp + ecx - 4], dl
inc ecx
cmp ecx, 4
jl 0x493dc0
mov esi, dword [ebp + 8]
lea ecx, [ebp - 4]
lea edx, [ecx + 1]
mov dword [esi], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0xf
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x493e00
sub ecx, edx
lea eax, [ebp - 4]
push ecx
push eax
mov ecx, esi
call fcn.00401820
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x4946d0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
push pe_nt_image_headers32
call fcn.004a06ae
push pe_nt_image_headers32
mov esi, eax
push 0
push esi
mov dword [ebp - 0x10], esi
call fcn.004a2550
push pe_nt_image_headers32
call fcn.004a06ae
push pe_nt_image_headers32
push 0
push eax
mov dword [ebp - 4], eax
call fcn.004a2550
mov ebx, dword [ebp + 8]
mov eax, esi
mov edi, dword [ebp + 0xc]
add esp, 0x20
xor ecx, ecx
mov dword [ebx], 0
mov dword [ebx + 0x10], 0
mov dword [ebx + 0x14], 0xf
mov ebx, dword [ebp - 4]
sub eax, ebx
mov dword [ebp - 0xc], eax
nop dword [eax + eax]
cmp dword [edi + 0x14], 0x10
mov dword [ebp - 8], edi
jb 0x49474e
mov eax, dword [edi]
mov dword [ebp - 8], eax
xor edx, edx
lea esi, [ebx + ecx]
mov eax, ecx
mov ebx, dword [ebp - 8]
div dword [edi + 0x10]
mov al, byte [edx + ebx]
mov edx, dword [ebp - 0xc]
mov ebx, dword [ebp - 4]
mov byte [edx + esi], al
mov byte [esi], cl
inc ecx
cmp ecx, 0x100
jl 0x494740
mov esi, ebx
mov dword [ebp - 8], pe_nt_image_headers32
mov ebx, dword [ebp + 8]
xor edi, edi
mov eax, dword [ebp - 0xc]
mov dl, byte [esi]
movzx ecx, dl
movzx eax, byte [esi + eax]
add edi, eax
add edi, ecx
and edi, 0x800000ff
jns 0x4947a0
dec edi
or edi, 0xffffff00
inc edi
mov ecx, dword [ebp - 4]
mov al, byte [ecx + edi]
mov byte [esi], al
inc esi
sub dword [ebp - 8], 1
mov byte [ecx + edi], dl
jne 0x494780
mov edi, dword [ebp + 0x10]
mov ecx, ebx
push 0
push dword [edi + 0x10]
call fcn.004949f0
xor eax, eax
xor esi, esi
xor ecx, ecx
cmp dword [edi + 0x10], eax
mov edi, dword [ebp - 4]
jbe 0x494848
nop
inc ecx
and ecx, 0x800000ff
jns 0x4947e1
dec ecx
or ecx, 0xffffff00
inc ecx
mov dword [ebp - 4], ecx
mov cl, byte [edi + ecx]
movzx edx, cl
add eax, edx
and eax, 0x800000ff
jns 0x4947fa
dec eax
or eax, 0xffffff00
inc eax
mov ebx, dword [ebp - 4]
mov dword [ebp - 0xc], eax
mov al, byte [edi + eax]
mov byte [edi + ebx], al
mov eax, dword [ebp - 0xc]
mov byte [edi + eax], cl
mov eax, ebx
mov ecx, dword [ebp + 0x10]
mov ebx, dword [ebp + 8]
movzx eax, byte [edi + eax]
add eax, edx
cmp dword [ecx + 0x14], 0x10
movzx eax, al
mov dl, byte [eax + edi]
mov eax, ecx
jb 0x49482a
mov eax, dword [ecx]
mov al, byte [eax + esi]
xor al, dl
cmp dword [ebx + 0x14], 0x10
mov edx, ebx
jb 0x494839
mov edx, dword [ebx]
mov byte [edx + esi], al
inc esi
cmp esi, dword [ecx + 0x10]
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
jb 0x4947d0
test edi, edi
je 0x49485a
push pe_nt_image_headers32
push edi
call fcn.004a06de
add esp, 8
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x49486f
push pe_nt_image_headers32
push eax
call fcn.004a06de
add esp, 8
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4aefef
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4ce704
push 0x4ce6fc
push str.FlsAlloc
push 0x1e
call fcn.004aee1b
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4af023
push dword [ebp + 8]
mov ecx, esi
call dword [0x4c02ac]
call esi
jmp 0x4af029
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x4af06d
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4ce714
push 0x4ce70c
push str.FlsGetValue
push 0x20
call fcn.004aee1b
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4af0a4
push dword [ebp + 8]
mov ecx, esi
call dword [0x4c02ac]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]
Function at 0x4b07b7
Capabilities:
Read file on windows

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

Function at 0x4b0bb1
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.004a06f0
mov eax, dword [0x4db05c]
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.004af68b
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x4b0bf3
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x4b0d4f
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.004a0920
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 + 0x4dd3e8]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.004b1ba8
mov ecx, dword [esi*4 + 0x4dd3e8]
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 0x4b0d48
cmp eax, dword [edi + ecx + 0x24]
jne 0x4b0d48
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 0x4b0d48
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.004b1ba8
add esp, 0x14
test edx, edx
jl 0x4b0d48
jg 0x4b0cbe
test eax, eax
jb 0x4b0d48
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x4b0d48
jl 0x4b0cd8
cmp dword [ebp - 0x1008], eax
ja 0x4b0d48
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x4b0cf6
test ebx, ebx
je 0x4b0d2f
cmp ecx, edi
jae 0x4b0d2f
mov al, byte [ecx]
cmp al, 0xd
jne 0x4b0d10
lea eax, [edi - 1]
cmp ecx, eax
jae 0x4b0d1c
cmp byte [ecx + 1], 0xa
jne 0x4b0d1c
inc ecx
jmp 0x4b0d1c
movzx eax, al
movsx eax, byte [eax + 0x4db2b8]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x4b0cf6
cmp edx, ebx
jne 0x4b0cf6
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x4b0d4d
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.004a13c3
leave
ret
Function at 0x4b1046
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 + 0x4dd3e8]
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 0x4b1086
cmp byte [ebx], 0xa
jne 0x4b1086
or byte [eax + edi + 0x28], 4
jmp 0x4b108b
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x4b1189
mov al, byte [edx]
cmp al, 0x1a
je 0x4b116b
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x4b10ba
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x4b10df
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x4b10e9
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 0x4b109c
jmp 0x4b1189
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 0x4b1166
cmp dword [ebp - 0xc], 0
je 0x4b1166
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x4dd3e8]
test byte [eax + edi + 0x28], 0x48
je 0x4b1140
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x4b112b
mov byte [esi], dl
jmp 0x4b113c
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x4dd3e8]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x4b1189
cmp byte [ebp - 1], 0xa
jne 0x4b114f
cmp esi, ebx
jne 0x4b114f
mov byte [esi], 0xa
jmp 0x4b1188
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.004b1bc6
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x4b1189
mov byte [esi], 0xd
jmp 0x4b1188
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x4dd3e8]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x4b1185
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x4b1189
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x4b1192
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 + 0x4dd3e8]
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 0x4b11d5
cmp word [esi], dx
jne 0x4b11d5
or byte [edi + eax + 0x28], 4
jmp 0x4b11da
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 0x4b132d
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 0x4b130d
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x4b121c
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x4b1252
cmp eax, edx
jae 0x4b125e
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 0x4b11f4
jmp 0x4b132d
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 0x4b1309
cmp dword [ebp - 0x14], 0
je 0x4b1309
mov eax, dword [ebx*4 + 0x4dd3e8]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x4b12e1
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x4b12aa
mov word [esi], cx
jmp 0x4b12dd
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x4dd3e8]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x4dd3e8]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x4dd3e8]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x4b132d
pop ebx
cmp word [ebp - 4], bx
jne 0x4b12f2
cmp esi, dword [ebp + 0xc]
jne 0x4b12f2
mov word [esi], bx
jmp 0x4b132a
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.004b1bc6
add esp, 0x10
cmp word [ebp - 4], bx
je 0x4b132d
push 0xd
jmp 0x4b1326
mov ecx, dword [ebx*4 + 0x4dd3e8]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x4b1324
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x4b132d
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 0x4b791a
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 0x4b79b7
push ebx
push esi
call fcn.004b78e3
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.004b65db
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x4b7964
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x4b79b6
push edi
push eax
call fcn.004b1e1a
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x4b7984
call fcn.004aeae3
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x4b79b5
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.004b65db
add esp, 0x20
test eax, eax
jne 0x4b79a3
push edi
call fcn.004aeae3
jmp 0x4b79ab
push ebx
call fcn.004aeae3
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 0x4b79ba
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x4b79cb
pop esi
ret
push ebx
push edi
push esi
call fcn.004b78e3
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.004b1e1a
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x4b79f3
push ebx
push esi
push edi
call fcn.004a1bf0
add esp, 0xc
push 0
call fcn.004aeae3
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x4b813f
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.004b7c66
Function at 0x4bf2f0
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.004bf26c
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x4bf468
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x4bf468
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x4bf417
jg 0x4bf349
test eax, eax
je 0x4bf40d
push 1
push 0x1000
call fcn.004aeb1d
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x4bf36f
mov eax, dword [ebp + 0x14]
push 0xc
pop edi
mov byte [eax + 0x1c], 1
mov dword [eax + 0x18], edi
jmp 0x4bf404
push 0x8000
push ebx
call fcn.004abe27
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 0x4bf39b
jg 0x4bf396
cmp ecx, 0x1000
jb 0x4bf39b
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.004b0428
add esp, 0x10
cmp eax, 0xffffffff
je 0x4bf3e0
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 0x4bf396
jl 0x4bf3c7
test ecx, ecx
jne 0x4bf388
push dword [ebp - 0xc]
push ebx
call fcn.004abe27
push esi
call fcn.004aeae3
add esp, 0xc
xor edi, edi
jmp 0x4bf479
cmp byte [edi + 0x24], 0
je 0x4bf3f7
cmp dword [edi + 0x20], 5
jne 0x4bf3f7
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x4bf402
mov edi, dword [edi + 0x18]
jmp 0x4bf404
xor edi, edi
push esi
call fcn.004aeae3
pop ecx
jmp 0x4bf479
test ecx, ecx
jg 0x4bf3d9
jl 0x4bf417
test eax, eax
jae 0x4bf3d9
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.004b1bc6
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x4bf43a
mov edi, dword [ebp + 0x14]
cmp byte [edi + 0x1c], 0
je 0x4bf3d9
jmp 0x4bf471
push ebx
call fcn.004b8514
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x4bf3d9
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 0x4bf479
mov edi, dword [ebp + 0x14]
cmp byte [edi + 0x1c], 0
je 0x4bf476
mov edi, dword [edi + 0x18]
jmp 0x4bf479
push 0x16
pop edi
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.004b1bc6
add esp, 0x10
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret