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

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x10
xor ecx, ecx
push ebx
push ebp
mov ebp, dword [esp + 0x20]
push esi
push edi
mov dword [esp + 0x1c], ecx
test ebp, ebp
je 0x10016481
cmp eax, ebp
jae 0x100165e6
mov bl, byte [eax]
test bl, bl
je 0x100165e6
movzx ecx, bl
mov edx, ebp
shr ecx, 3
movsx edi, byte [ecx + 0x1009399c]
xor ecx, ecx
test edi, edi
mov dword [esp + 0x14], edi
sete cl
add ecx, edi
mov dword [esp + 0x18], ecx
test ebp, ebp
jne 0x100164b2
lea edx, [ecx + eax]
cmp eax, edx
lea esi, [eax + 1]
sbb cl, cl
and cl, bl
mov byte [esp + 0x13], cl
cmp esi, edx
jae 0x100164c7
mov bh, byte [esi]
jmp 0x100164c9
xor bh, bh
lea esi, [eax + 2]
mov byte [esp + 0x12], bh
cmp esi, edx
jae 0x100164d8
mov ch, byte [esi]
jmp 0x100164da
xor ch, ch
lea esi, [eax + 3]
mov byte [esp + 0x11], ch
cmp esi, edx
jae 0x100164e9
mov bl, byte [esi]
jmp 0x100164eb
xor bl, bl
mov edi, dword [edi*4 + 0x100939bc]
movzx edx, ch
movzx ecx, cl
and edi, ecx
movzx esi, bh
shl edi, 6
mov ecx, esi
and ecx, 0x3f
mov byte [esp + 0x28], bl
or edi, ecx
movzx ebx, bl
shl edi, 6
mov ecx, edx
and ecx, 0x3f
and edx, 0xc0
or edi, ecx
and esi, 0xc0
mov ecx, ebx
shl edi, 6
and ecx, 0x3f
shr ebx, 2
or edi, ecx
or ebx, edx
mov ecx, dword [esp + 0x14]
shr ebx, 2
or ebx, esi
mov esi, dword [esp + 0x14]
shr ebx, 2
mov ecx, dword [ecx*4 + 0x100939e4]
shr edi, cl
cmp edi, dword [esi*4 + 0x100939d0]
sbb ecx, ecx
xor edx, edx
and ecx, 0x40
or ebx, ecx
mov ecx, edi
and ecx, 0xfffff800
cmp ecx, 0xd800
mov ecx, 0x80
cmove edx, ecx
mov ecx, 0xffff
or ebx, edx
cmp ecx, edi
sbb ecx, ecx
and ecx, 0x100
or ebx, ecx
mov ecx, dword [esi*4 + 0x100939f8]
xor ebx, 0x2a
sar ebx, cl
test ebx, ebx
je 0x100165d6
xor edx, edx
cmp byte [esp + 0x28], dl
setne dl
xor ecx, ecx
cmp byte [esp + 0x11], cl
setne cl
add edx, ecx
xor ecx, ecx
cmp byte [esp + 0x12], cl
setne cl
add edx, ecx
xor ecx, ecx
cmp byte [esp + 0x13], cl
setne cl
add edx, ecx
cmp dword [esp + 0x18], edx
cmovl edx, dword [esp + 0x18]
mov ecx, edx
add eax, ecx
mov ecx, dword [esp + 0x1c]
inc ecx
jmp 0x10016471
mov ecx, dword [esp + 0x18]
add eax, ecx
mov ecx, dword [esp + 0x1c]
inc ecx
jmp 0x10016471
pop edi
pop esi
pop ebp
mov eax, ecx
pop ebx
add esp, 0x10
ret
Function at 0x10016640
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x14
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
dec eax
push ebp
mov ebp, edx
mov dword [esp + 0x10], ebp
lea eax, [edx + eax*2]
mov dword [esp + 0x14], eax
cmp edx, eax
mov eax, dword [esp + 0x24]
jae 0x10016814
push esi
mov esi, dword [esp + 0x2c]
push ebx
push edi
nop dword [eax]
test esi, esi
je 0x1001667c
cmp eax, esi
jae 0x1001680d
mov cl, byte [eax]
mov byte [esp + 0x2c], cl
test cl, cl
je 0x1001680d
movzx ecx, cl
xor ebx, ebx
shr ecx, 3
mov edx, esi
movsx ecx, byte [ecx + 0x1009399c]
test ecx, ecx
mov dword [esp + 0x18], ecx
sete bl
add ebx, ecx
test esi, esi
jne 0x100166ad
lea edx, [ebx + eax]
cmp eax, edx
lea esi, [eax + 1]
sbb cl, cl
and cl, byte [esp + 0x2c]
mov byte [esp + 0x13], cl
cmp esi, edx
jae 0x100166c8
mov ch, byte [esi]
mov byte [esp + 0x11], ch
jmp 0x100166cd
mov byte [esp + 0x11], 0
lea esi, [eax + 2]
cmp esi, edx
jae 0x100166dc
mov ch, byte [esi]
mov byte [esp + 0x2c], ch
jmp 0x100166e1
mov byte [esp + 0x2c], 0
lea esi, [eax + 3]
cmp esi, edx
jae 0x100166ec
mov ch, byte [esi]
jmp 0x100166ee
xor ch, ch
mov ebp, dword [esp + 0x18]
movzx esi, byte [esp + 0x11]
movzx edx, byte [esp + 0x2c]
movzx edi, ch
mov ebp, dword [ebp*4 + 0x100939bc]
mov byte [esp + 0x12], ch
movzx ecx, cl
and ebp, ecx
mov ecx, esi
and ecx, 0x3f
mov dword [esp + 0x14], ebp
shl dword [esp + 0x14], 6
and esi, 0xc0
or dword [esp + 0x14], ecx
mov ecx, edx
shl dword [esp + 0x14], 6
and ecx, 0x3f
or dword [esp + 0x14], ecx
and edx, 0xc0
shl dword [esp + 0x14], 6
mov ecx, edi
mov ebp, dword [esp + 0x14]
and ecx, 0x3f
or ebp, ecx
shr edi, 2
mov ecx, dword [esp + 0x18]
or edi, edx
shr edi, 2
or edi, esi
shr edi, 2
mov ecx, dword [ecx*4 + 0x100939e4]
shr ebp, cl
mov esi, ebp
mov dword [esp + 0x14], ebp
mov ebp, dword [esp + 0x18]
cmp esi, dword [ebp*4 + 0x100939d0]
sbb ecx, ecx
xor edx, edx
and ecx, 0x40
or edi, ecx
mov ecx, esi
and ecx, 0xfffff800
cmp ecx, 0xd800
mov ecx, 0x80
cmove edx, ecx
mov ecx, 0xffff
or edi, edx
cmp ecx, esi
sbb ecx, ecx
and ecx, 0x100
or edi, ecx
mov ecx, dword [ebp*4 + 0x100939f8]
mov ebp, dword [esp + 0x1c]
xor edi, 0x2a
sar edi, cl
test edi, edi
je 0x100167f2
xor edx, edx
mov esi, 0xfffd
cmp byte [esp + 0x12], dl
setne dl
xor ecx, ecx
cmp byte [esp + 0x2c], cl
setne cl
add edx, ecx
xor ecx, ecx
cmp byte [esp + 0x11], cl
setne cl
add edx, ecx
xor ecx, ecx
cmp byte [esp + 0x13], cl
setne cl
add edx, ecx
cmp ebx, edx
cmovl edx, ebx
mov ebx, edx
mov word [ebp], si
add eax, ebx
mov esi, dword [esp + 0x34]
add ebp, 2
mov dword [esp + 0x1c], ebp
cmp ebp, dword [esp + 0x20]
jb 0x10016670
mov edx, dword [esp + 0x28]
pop edi
pop ebx
pop esi
xor ecx, ecx
mov word [ebp], cx
mov ecx, dword [esp + 0x2c]
test ecx, ecx
je 0x10016824
mov dword [ecx], eax
sub ebp, edx
sar ebp, 1
mov eax, ebp
pop ebp
add esp, 0x14
ret
Function at 0x10017dd0
Capabilities:
Read file on windows

Disassembly:
push esi
push 0x100940fc
push dword [esp + 0xc]
call fcn.10015eb0
mov esi, eax
add esp, 8
test esi, esi
je 0x10017ec0
push ebx
push edi
push esi
call fcn.100597b4
mov ebx, eax
add esp, 4
cmp ebx, 0xffffffff
je 0x10017eb5
push 2
push 0
push esi
call fcn.10059155
add esp, 0xc
test eax, eax
jne 0x10017eb5
push esi
call fcn.100597b4
mov edi, eax
add esp, 4
cmp edi, 0xffffffff
je 0x10017eb5
push 0
push ebx
push esi
call fcn.10059155
add esp, 0xc
test eax, eax
jne 0x10017eb5
mov eax, dword [0x100ac57c]
test eax, eax
je 0x10017e4a
inc dword [eax + 0xb0]
push dword [0x100ac584]
push edi
call dword [0x100a9368]
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x10017eb5
push esi
push edi
push 1
push ebx
call fcn.10058db2
add esp, 0x10
push esi
cmp eax, edi
je 0x10017e7c
call fcn.10058846
add esp, 4
jmp 0x10017e92
call fcn.10058846
add esp, 4
test edi, edi
je 0x10017e92
push edi
push ebx
call fcn.10017ed0
add esp, 8
mov eax, dword [0x100ac57c]
test eax, eax
je 0x10017ea1
dec dword [eax + 0xb0]
push dword [0x100ac584]
push ebx
call dword [0x100a936c]
add esp, 8
pop edi
pop ebx
pop esi
ret
push esi
call fcn.10058846
add esp, 4
pop edi
pop ebx
pop esi
ret
Function at 0x10023750
Capabilities:
Read file on windows

Disassembly:
push edi
mov edi, dword [0x100ac57c]
cmp byte [edi + 0x5a78], 0
lea eax, [edi + 0x20]
jne 0x10023867
mov ecx, dword [eax]
push ebx
push ebp
test ecx, ecx
je 0x1002385e
push esi
push 0x100940fc
push ecx
call fcn.10015eb0
mov esi, eax
add esp, 8
test esi, esi
je 0x1002385a
push esi
call fcn.100597b4
mov ebp, eax
add esp, 4
cmp ebp, 0xffffffff
je 0x10023851
push 2
push 0
push esi
call fcn.10059155
add esp, 0xc
test eax, eax
jne 0x10023851
push esi
call fcn.100597b4
mov ebx, eax
add esp, 4
cmp ebx, 0xffffffff
je 0x10023851
push 0
push ebp
push esi
call fcn.10059155
add esp, 0xc
test eax, eax
jne 0x10023851
mov eax, dword [0x100ac57c]
test eax, eax
je 0x100237e8
inc dword [eax + 0xb0]
push dword [0x100ac584]
push ebx
call dword [0x100a9368]
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x10023851
push esi
push ebx
push 1
push ebp
call fcn.10058db2
add esp, 0x10
push esi
cmp eax, ebx
je 0x10023839
call fcn.10058846
add esp, 4
mov eax, dword [0x100ac57c]
test eax, eax
je 0x10023827
dec dword [eax + 0xb0]
push dword [0x100ac584]
push ebp
call dword [0x100a936c]
add esp, 8
jmp 0x1002385a
call fcn.10058846
add esp, 4
test ebx, ebx
je 0x10023818
push ebx
push ebp
call fcn.10017ed0
add esp, 8
jmp 0x10023818
push esi
call fcn.10058846
add esp, 4
lea eax, [edi + 0x20]
pop esi
pop ebp
mov byte [edi + 0x5a78], 1
pop ebx
movss xmm0, dword [edi + 0x5a7c]
xorps xmm1, xmm1
comiss xmm0, xmm1
jbe 0x100238b5
subss xmm0, dword [edi + 0x18]
comiss xmm1, xmm0
movss dword [edi + 0x5a7c], xmm0
jb 0x100238b5
mov eax, dword [eax]
test eax, eax
je 0x100238a4
push eax
call fcn.10020180
add esp, 4
mov dword [edi + 0x5a7c], 0
pop edi
ret
mov byte [edi + 0x96], 1
mov dword [edi + 0x5a7c], 0
pop edi
ret
Function at 0x1002b460
Capabilities:
Enumerate pe sections

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
mov edi, ecx
cmp esi, 8
ja 0x1002b56f
test byte [edi], 2
jne 0x1002b56f
mov eax, dword [edi + 0x468]
lea esi, [esi + esi*2]
mov ecx, dword [edi + 0x50]
movss xmm2, dword [esi*8 + 0x10097f68]
movss xmm4, dword [esi*8 + 0x10097f6c]
lea edx, [eax*8]
sub edx, eax
movzx eax, word [ecx + edx*4 + 4]
movd xmm5, eax
movzx eax, word [ecx + edx*4 + 6]
cvtdq2ps xmm5, xmm5
movd xmm3, eax
addss xmm5, dword [esi*8 + 0x10097f60]
mov eax, dword [esp + 0x14]
cvtdq2ps xmm3, xmm3
movaps xmm1, xmm5
addss xmm3, dword [esi*8 + 0x10097f64]
movss dword [eax + 4], xmm4
movss dword [eax], xmm2
mov ecx, dword [esi*8 + 0x10097f70]
mov edx, dword [esi*8 + 0x10097f74]
mov eax, dword [esp + 0x10]
addss xmm4, xmm3
movaps xmm0, xmm3
mov dword [eax], ecx
mov dword [eax + 4], edx
mulss xmm1, dword [edi + 0x2c]
mov eax, dword [esp + 0x18]
mulss xmm0, dword [edi + 0x30]
movss dword [eax], xmm1
movaps xmm1, xmm2
movss dword [eax + 4], xmm0
addss xmm1, xmm5
addss xmm5, dword [0x100980f4]
movaps xmm0, xmm4
mulss xmm0, dword [edi + 0x30]
mulss xmm1, dword [edi + 0x2c]
movss dword [eax + 0xc], xmm0
movaps xmm0, xmm5
addss xmm5, xmm2
movss dword [eax + 8], xmm1
mulss xmm0, dword [edi + 0x2c]
mov eax, dword [esp + 0x1c]
mulss xmm3, dword [edi + 0x30]
movss dword [eax], xmm0
movss dword [eax + 4], xmm3
mulss xmm5, dword [edi + 0x2c]
mulss xmm4, dword [edi + 0x30]
pop edi
movss dword [eax + 8], xmm5
pop esi
movss dword [eax + 0xc], xmm4
mov al, 1
ret 0x14
pop edi
xor al, al
pop esi
ret 0x14

Function at 0x1002fa70
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push esi
mov esi, ecx
mov eax, dword [esi + 8]
test eax, eax
je 0x1002fa97
push eax
mov dword [esi + 4], 0
mov dword [esi], 0
call fcn.10018490
add esp, 4
mov dword [esi + 8], 0
mov eax, dword [esi + 0x14]
test eax, eax
je 0x1002fabc
push eax
mov dword [esi + 0x10], 0
mov dword [esi + 0xc], 0
call fcn.10018490
add esp, 4
mov dword [esi + 0x14], 0
mov eax, dword [esi + 0x20]
test eax, eax
je 0x1002fae1
push eax
mov dword [esi + 0x1c], 0
mov dword [esi + 0x18], 0
call fcn.10018490
add esp, 4
mov dword [esi + 0x20], 0
mov dword [esi + 0x24], 0
mov dword [esi + 0x28], 0
mov dword [esi + 0x34], 0
mov dword [esi + 0x38], 0
mov eax, dword [esi + 0x44]
test eax, eax
je 0x1002fb22
push eax
mov dword [esi + 0x40], 0
mov dword [esi + 0x3c], 0
call fcn.10018490
add esp, 4
mov dword [esi + 0x44], 0
mov eax, dword [esi + 0x50]
test eax, eax
je 0x1002fb47
push eax
mov dword [esi + 0x4c], 0
mov dword [esi + 0x48], 0
call fcn.10018490
add esp, 4
mov dword [esi + 0x50], 0
mov eax, dword [esi + 0x5c]
test eax, eax
je 0x1002fb6c
push eax
mov dword [esi + 0x58], 0
mov dword [esi + 0x54], 0
call fcn.10018490
add esp, 4
mov dword [esi + 0x5c], 0
lea ecx, [esi + 0x78]
pop esi
jmp fcn.1002b2b0
Function at 0x10056235
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x10056274
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x10056274
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x10056274
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x10056274
cmp dword [ecx + 0x74], 0xe
jbe 0x10056274
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret

Function at 0x100595ad
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.1006b5f0
mov eax, dword [0x100a9570]
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.1005e42f
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x100595ef
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x1005974b
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.1004d710
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 + 0x100ad000]
push dword [eax + edi + 0x24]
push dword [eax + edi + 0x20]
push ebx
call fcn.10061f7c
mov ecx, dword [esi*4 + 0x100ad000]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [ecx + edi + 0x20]
jne 0x10059744
cmp eax, dword [ecx + edi + 0x24]
jne 0x10059744
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [ecx + edi + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10059744
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.10061f7c
add esp, 0x14
test edx, edx
jl 0x10059744
jg 0x100596ba
test eax, eax
jb 0x10059744
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x10059744
jl 0x100596d4
cmp dword [ebp - 0x1008], eax
ja 0x10059744
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x100596f2
test ebx, ebx
je 0x1005972b
cmp ecx, edi
jae 0x1005972b
mov al, byte [ecx]
cmp al, 0xd
jne 0x1005970c
lea eax, [edi - 1]
cmp ecx, eax
jae 0x10059718
cmp byte [ecx + 1], 0xa
jne 0x10059718
inc ecx
jmp 0x10059718
movzx eax, al
movsx eax, byte [eax + 0x100a9770]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x100596f2
cmp edx, ebx
jne 0x100596f2
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x10059749
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.1004d4b3
leave
ret
Function at 0x1005e932
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x1009d59c
push 0x1009d594
push str.FlsAlloc
push 0x1f
call fcn.1005e80e
mov esi, eax
add esp, 0x10
test esi, esi
je 0x1005e966
push dword [ebp + 8]
mov ecx, esi
call dword [0x1006d230]
call esi
jmp 0x1005e96c
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x1005e9b0
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x1009d5ac
push 0x1009d5a4
push str.FlsGetValue
push 0x21
call fcn.1005e80e
mov esi, eax
add esp, 0x10
test esi, esi
je 0x1005e9e7
push dword [ebp + 8]
mov ecx, esi
call dword [0x1006d230]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x1005e9ef
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x1009d5b4
push 0x1009d5ac
push str.FlsSetValue
push 0x22
call fcn.1005e80e
mov esi, eax
add esp, 0x10
test esi, esi
je 0x1005ea29
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x1006d230]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x1006127a
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
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 + 0x100ad000]
mov dword [ebp - 0xc], ecx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x100612ba
cmp byte [ebx], 0xa
jne 0x100612ba
or byte [edi + eax + 0x28], 4
jmp 0x100612bf
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
mov dword [ebp - 8], eax
cmp ebx, ecx
jae 0x100613be
mov dl, byte [eax]
cmp dl, 0x1a
je 0x100613a1
inc eax
cmp dl, 0xd
je 0x100612eb
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x10061311
cmp eax, ecx
jae 0x1006131f
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add dword [ebp - 8], eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
xor edx, edx
inc edx
add esi, edx
cmp eax, ecx
jb 0x100612d3
jmp 0x100613be
push 0
lea eax, [ebp - 0x10]
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 0x1006139c
cmp dword [ebp - 0x10], 0
je 0x1006139c
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x100ad000]
test byte [eax + edi + 0x28], 0x48
je 0x10061376
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x10061361
mov byte [esi], dl
jmp 0x10061372
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x100ad000]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x100613be
cmp byte [ebp - 1], 0xa
jne 0x10061385
cmp esi, ebx
jne 0x10061385
mov byte [esi], 0xa
jmp 0x100613bd
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.10061f9a
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x100613be
mov byte [esi], 0xd
jmp 0x100613bd
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x100ad000]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x100613bb
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x100613be
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x100613c7
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
push esi
sar ecx, 6
push edi
imul edi, eax, 0x38
mov dword [ebp - 8], ecx
mov eax, dword [ecx*4 + 0x100ad000]
push 0xa
pop edx
mov dword [ebp - 0x18], edx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x1006140d
cmp word [ebx], dx
jne 0x1006140d
or byte [eax + edi + 0x28], 4
jmp 0x10061412
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + ecx*2]
mov eax, ebx
mov dword [ebp - 0xc], edx
mov esi, ebx
mov dword [ebp - 4], eax
cmp ebx, edx
jae 0x10061575
mov dword [ebp - 0x10], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0xc]
cmp ecx, 0x1a
je 0x10061555
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x10061453
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x10061489
cmp eax, edx
jae 0x10061497
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x18]
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 - 0xc]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
push 2
pop ecx
add esi, ecx
cmp eax, edx
jb 0x1006142e
jmp 0x10061575
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10061550
cmp dword [ebp - 0x18], 0
je 0x10061550
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x100ad000]
test byte [eax + edi + 0x28], 0x48
je 0x10061526
lea eax, [esi + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ebp - 4]
pop ecx
mov word [ebp - 2], ax
cmp ax, cx
jne 0x100614ea
mov word [esi], cx
jmp 0x10061521
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x100ad000]
mov dx, word [ebp - 2]
shr ecx, 8
push 0xa
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x100ad000]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x100ad000]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x10061575
pop eax
cmp word [ebp - 4], ax
jne 0x10061536
cmp esi, ebx
jne 0x10061536
mov word [esi], ax
jmp 0x10061572
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.10061f9a
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x10061575
push 0xd
pop eax
jmp 0x10061531
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x100ad000]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x1006156f
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x10061575
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x10064780
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 0x1006481d
push ebx
push esi
call fcn.10064749
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.100646dd
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x100647ca
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x1006481c
push edi
push eax
call fcn.1005ecf2
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x100647ea
call fcn.1005d6f1
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x1006481b
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.100646dd
add esp, 0x20
test eax, eax
jne 0x10064809
push edi
call fcn.1005d6f1
jmp 0x10064811
push ebx
call fcn.1005d6f1
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 0x1006a9c1
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]
mov edi, dword [ebp + 0x14]
push dword [ebp + 0xc]
push ebx
call fcn.1006a93d
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x1006ab30
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x1006ab30
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x1006aae5
jg 0x1006aa1d
test eax, eax
je 0x1006aadb
push 1
push 0x1000
call fcn.1005d694
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x1006aa40
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x1006aad2
push 0x8000
push ebx
call fcn.1006a86e
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x1006aa69
jg 0x1006aa64
cmp ecx, 0x1000
jb 0x1006aa69
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.1006105e
add esp, 0x10
cmp eax, 0xffffffff
je 0x1006aaae
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 0x1006aa64
jl 0x1006aa95
test ecx, ecx
jne 0x1006aa56
push dword [ebp - 0xc]
push ebx
call fcn.1006a86e
push esi
call fcn.1005d6f1
add esp, 0xc
xor ebx, ebx
jmp 0x1006ab3e
cmp byte [edi + 0x24], 0
je 0x1006aac5
cmp dword [edi + 0x20], 5
jne 0x1006aac5
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x1006aad0
mov ebx, dword [edi + 0x18]
jmp 0x1006aad2
xor ebx, ebx
push esi
call fcn.1005d6f1
pop ecx
jmp 0x1006ab3e
test ecx, ecx
jg 0x1006aaa7
jl 0x1006aae5
test eax, eax
jae 0x1006aaa7
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.10061f9a
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x1006ab05
cmp byte [edi + 0x1c], 0
je 0x1006aaa7
jmp 0x1006ab36
push ebx
call fcn.10065f14
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x1006aaa7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [edi + 0x24], 1
mov dword [edi + 0x20], eax
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x1006ab3e
cmp byte [edi + 0x1c], 0
je 0x1006ab3b
mov ebx, dword [edi + 0x18]
jmp 0x1006ab3e
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.10061f9a
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x1006b590
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x1006b5bd
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x1006b5bd
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret