joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10005300
Capabilities:
Access peb ldr_data
Get process heap force flags

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1003f56f
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x10050080]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x18], 0
lea ecx, [ebx + 0x70]
mov dword [ebx], 0x10048894
call fcn.10006d50
mov dword [ebp - 4], 0
lea esi, [ebx + 0x10]
mov eax, dword [ebx]
mov dword [ebp - 0x18], 1
mov dword [ebp - 0x14], esi
mov eax, dword [eax + 4]
mov dword [ebx + eax], vtable.std::basic_istream_char__struct_std::char_traits_char__.0
mov eax, dword [ebx]
mov ecx, dword [eax + 4]
push ecx
push esi
lea eax, [ecx - 0x18]
mov dword [ecx + ebx - 4], eax
mov eax, dword [ebx]
mov dword [ebx + 8], 0
mov dword [ebx + 0xc], 0
mov ecx, dword [eax + 4]
add ecx, ebx
call fcn.10007310
mov dword [ebp - 4], 2
mov eax, dword [ebx]
mov eax, dword [eax + 4]
mov dword [ebx + eax], vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebx]
mov ecx, dword [eax + 4]
mov dword [ebp - 0x1c], esi
lea eax, [ecx - 0x70]
mov dword [ecx + ebx - 4], eax
mov ecx, esi
call fcn.100070b0
lea eax, [ebx + 0x10]
lea ebx, [eax + 4]
mov dword [eax], vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov dword [eax + 0xc], ebx
lea ecx, [eax + 0x18]
mov dword [eax + 0x20], ecx
lea esi, [eax + 8]
mov byte [eax + 0x48], 0
lea edi, [eax + 0x14]
mov byte [eax + 0x3d], 0
lea edx, [eax + 0x24]
mov dword [eax + 0x10], esi
mov dword [eax + 0x1c], edi
mov dword [eax + 0x2c], edx
add eax, 0x28
mov dword [ebp - 0x1c], ebx
mov ebx, dword [ebp - 0x14]
mov dword [ebx + 0x30], eax
mov ebx, dword [ebp - 0x1c]
mov dword [esi], 0
mov dword [ecx], 0
mov ecx, dword [0x10051fb8]
mov dword [eax], 0
mov eax, dword [0x10051fb4]
mov dword [ebx], 0
mov ebx, dword [ebp - 0x14]
mov dword [edi], 0
mov dword [edx], 0
mov dword [ebx + 0x4c], 0
mov dword [ebx + 0x40], eax
mov dword [ebx + 0x44], ecx
mov dword [ebx + 0x38], 0
mov byte [ebp - 4], 3
cmp dword [ebx + 0x4c], 0
jne 0x100054b4
push 0x40
push 1
push dword [ebp + 8]
call fcn.1001a782
add esp, 0xc
test eax, eax
je 0x100054b4
push 1
push eax
mov ecx, ebx
call fcn.10006b60
mov eax, dword [ebx + 0x34]
mov esi, dword [eax + 4]
mov ecx, esi
mov dword [ebp - 0x1c], esi
mov eax, dword [esi]
call dword [eax + 4]
lea eax, [ebp - 0x20]
mov byte [ebp - 4], 4
push eax
call fcn.10007900
add esp, 4
mov ecx, ebx
push eax
call fcn.10006a00
test esi, esi
je 0x1000549d
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 8]
test eax, eax
je 0x1000549d
mov edx, dword [eax]
mov ecx, eax
push 1
call dword [edx]
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov esi, dword [ebp - 0x10]
push 0
mov eax, dword [esi]
mov ecx, dword [eax + 4]
xor eax, eax
add ecx, esi
cmp dword [ecx + 0x38], eax
sete al
lea eax, [eax*4 + 2]
or eax, dword [ecx + 0xc]
push eax
call fcn.10001d40
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
Function at 0x10006e70
Capabilities:
Hash data using fnv

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, 0x10
mov dword [ebp - 4], ecx
cmp eax, edi
jbe 0x10006e8e
add edi, edi
cmp edi, eax
jb 0x10006e88
xor ebx, ebx
mov dword [ebp - 0xc], 0xffffffff
lea esi, [edi - 1]
mov dword [ebp + 8], ebx
xor edx, edx
mov dword [ebp - 0x14], esi
test edi, edi
je 0x10006f43
cmp edi, 0x3fffffff
ja 0x10007036
lea ecx, [edi*4]
test ecx, ecx
je 0x10006f02
cmp ecx, 0x1000
jb 0x10006ef0
lea eax, [ecx + 0x23]
cmp eax, ecx
jbe 0x1000703b
push eax
call fcn.1001adff
add esp, 4
test eax, eax
je 0x10007040
lea ebx, [eax + 0x23]
and ebx, 0xffffffe0
mov dword [ebx - 4], eax
jmp 0x10006efb
push ecx
call fcn.1001adff
add esp, 4
mov ebx, eax
lea ecx, [edi*4]
lea eax, [ecx + ebx]
mov dword [ebp - 0x10], 0
lea esi, [ebp - 0xc]
mov dword [ebp + 8], eax
mov edx, eax
mov eax, dword [esi]
lea esi, [ebp - 0x10]
mov dword [ebp - 8], edx
cmp eax, dword [esi]
jne 0x10006f31
push ecx
push 0
push ebx
call fcn.1001cb50
mov edx, dword [ebp - 8]
add esp, 0xc
jmp 0x10006f40
mov ecx, edi
or eax, 0xffffffff
mov edi, ebx
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 8]
mov dword [ebp + 8], eax
mov esi, dword [ebp - 0x14]
mov ecx, dword [ebp - 4]
lea eax, [ebp - 0x20]
add ecx, 0xc
mov dword [ebp - 8], ecx
cmp eax, ecx
je 0x10006f67
mov eax, ebx
mov ebx, dword [ecx]
mov dword [ecx], eax
mov eax, dword [ebp + 8]
mov dword [ecx + 4], eax
mov eax, edx
mov edx, dword [ecx + 8]
mov dword [ecx + 8], eax
test ebx, ebx
je 0x10006f98
sub edx, ebx
mov eax, ebx
and edx, 0xfffffffc
cmp edx, 0x1000
jb 0x10006f8e
mov ebx, dword [eax - 4]
add edx, 0x23
sub eax, ebx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10007040
push edx
push ebx
call fcn.1001b14b
add esp, 8
mov ebx, dword [ebp - 4]
xor edi, edi
mov ecx, dword [ebx + 4]
mov eax, ecx
mov edx, dword [ebx]
sub eax, edx
sar eax, 3
test eax, eax
je 0x10007025
nop dword [eax]
movzx eax, byte [edx + edi*8]
xor eax, 0x811c9dc5
imul ecx, eax, 0x1000193
movzx eax, byte [edx + edi*8 + 1]
xor ecx, eax
movzx eax, byte [edx + edi*8 + 2]
imul ecx, ecx, 0x1000193
xor ecx, eax
movzx eax, byte [edx + edi*8 + 3]
mov edx, dword [ebp - 8]
imul ecx, ecx, 0x1000193
mov ebx, dword [edx]
xor ecx, eax
imul eax, ecx, 0x1000193
and eax, esi
xor ecx, ecx
nop
lea edx, [eax*4]
cmp dword [edx + ebx], 0
jl 0x10007009
inc eax
add eax, ecx
inc ecx
and eax, esi
cmp ecx, esi
jbe 0x10006ff0
jmp 0x10007011
mov eax, dword [ebp - 8]
mov eax, dword [eax]
mov dword [edx + eax], edi
mov ebx, dword [ebp - 4]
inc edi
mov ecx, dword [ebx + 4]
mov eax, ecx
mov edx, dword [ebx]
sub eax, edx
sar eax, 3
cmp edi, eax
jb 0x10006fb0
sub ecx, edx
pop edi
sar ecx, 3
pop esi
mov dword [ebx + 0x18], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4
call fcn.10007560
call fcn.100011e0
call fcn.10024339
int3
Function at 0x100070b0
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1003f700
mov eax, dword fs:[0]
push eax
push esi
push edi
mov eax, dword [0x10050080]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
push 8
mov dword [edi], vtable.std::basic_streambuf_char__struct_std::char_traits_char__.0
mov dword [edi + 4], 0
mov dword [edi + 8], 0
mov dword [edi + 0xc], 0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
mov dword [edi + 0x18], 0
mov dword [edi + 0x1c], 0
mov dword [edi + 0x20], 0
mov dword [edi + 0x24], 0
mov dword [edi + 0x28], 0
mov dword [edi + 0x2c], 0
mov dword [edi + 0x30], 0
call fcn.1001adff
mov esi, eax
push 1
mov dword [ebp - 4], 0
call fcn.1001a3ff
add esp, 8
mov dword [esi + 4], eax
mov ecx, edi
mov dword [edi + 0x34], esi
call fcn.10007050
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x10014870
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, eax
mov dword [esp + 0xc], ecx
shr esi, 5
mov ebx, eax
push edi
mov edi, edx
inc esi
mov dword [esp + 0x18], edi
mov edx, eax
cmp eax, esi
jb 0x100148bb
nop word [eax + eax]
movzx ecx, byte [edi + edx - 1]
mov eax, ebx
shl eax, 5
sub edx, esi
add ecx, eax
mov eax, ebx
shr eax, 2
add ecx, eax
xor ebx, ecx
cmp edx, esi
jae 0x100148a0
mov edx, dword [esp + 0x10]
add edx, 0x10
mov dword [esp + 0x14], edx
mov dword [esp + 0x1c], edx
mov eax, dword [edx]
mov ecx, dword [eax + 8]
mov eax, dword [eax]
dec ecx
and ecx, ebx
mov edi, dword [eax + ecx*4]
test edi, edi
je 0x10014979
mov ecx, dword [ebp + 8]
cmp dword [edi + 0xc], ecx
jne 0x1001493b
mov edx, dword [esp + 0x18]
lea eax, [edi + 0x10]
mov esi, ecx
sub esi, 4
jb 0x10014906
mov ecx, dword [edx]
cmp ecx, dword [eax]
jne 0x1001490b
add edx, 4
add eax, 4
sub esi, 4
jae 0x100148f5
cmp esi, 0xfffffffc
je 0x1001494e
mov cl, byte [edx]
cmp cl, byte [eax]
jne 0x10014938
cmp esi, 0xfffffffd
je 0x1001494e
mov cl, byte [edx + 1]
cmp cl, byte [eax + 1]
jne 0x10014938
cmp esi, 0xfffffffe
je 0x1001494e
mov cl, byte [edx + 2]
cmp cl, byte [eax + 2]
jne 0x10014938
cmp esi, 0xffffffff
je 0x1001494e
mov cl, byte [edx + 3]
cmp cl, byte [eax + 3]
je 0x1001494e
mov ecx, dword [ebp + 8]
mov edi, dword [edi]
test edi, edi
jne 0x100148e2
mov edi, dword [esp + 0x10]
lea eax, [edi + 0x10]
mov dword [esp + 0x1c], eax
jmp 0x1001497d
mov edx, dword [esp + 0x14]
mov al, byte [edi + 5]
mov ecx, dword [edx]
movzx edx, byte [ecx + 0x14]
not edx
movzx ecx, al
and edx, ecx
test dl, 3
je 0x10014a10
xor al, 3
mov byte [edi + 5], al
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [esp + 0x10]
mov esi, dword [ebp + 8]
lea eax, [esi + 1]
cmp eax, 0xffffffed
jbe 0x10014996
push str.memory_allocation_error:_block_too_big
push edi
call fcn.1000b1b0
add esp, 8
lea eax, [esi + 0x11]
xor edx, edx
push eax
push 0
mov ecx, edi
call fcn.1000ea40
mov edx, dword [esp + 0x1c]
mov edi, eax
push esi
push dword [esp + 0x24]
mov dword [edi + 0xc], esi
lea eax, [edi + 0x10]
mov dword [edi + 8], ebx
mov ecx, dword [edx]
push eax
mov cl, byte [ecx + 0x14]
and cl, 3
mov byte [edi + 4], 4
mov byte [edi + 5], cl
mov byte [edi + 6], 0
call fcn.1001c550
mov edx, dword [esp + 0x30]
add esp, 0x14
mov byte [edi + esi + 0x10], 0
mov edx, dword [edx]
mov ecx, dword [edx + 8]
mov eax, dword [edx]
dec ecx
and ecx, ebx
mov eax, dword [eax + ecx*4]
mov dword [edi], eax
mov eax, dword [edx]
mov dword [eax + ecx*4], edi
inc dword [edx + 4]
mov eax, dword [edx + 8]
cmp dword [edx + 4], eax
jbe 0x10014a10
cmp eax, 0x3ffffffe
jg 0x10014a10
mov ecx, dword [esp + 0x10]
lea edx, [eax + eax]
call fcn.10014790
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x10019ec0
Capabilities:
Hash data using murmur3

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
mov eax, edx
mov esi, ecx
mov dword [ebp - 0xc], eax
push edi
lea edi, [esi + eax]
mov dword [ebp - 8], edi
cmp eax, 0x10
jb 0x10019f66
lea eax, [edi - 0x10]
mov edx, 0x24234452
push ebx
mov dword [ebp - 4], eax
mov ebx, 0x85ebcaa1
mov edi, 0x2a
mov eax, 0x61c88679
nop dword [eax]
imul ecx, dword [esi], 0x7a143589
sub edx, ecx
imul ecx, dword [esi + 4], 0x7a143589
rol edx, 0xd
imul edx, edx, 0x9e3779b1
sub ebx, ecx
imul ecx, dword [esi + 8], 0x7a143589
rol ebx, 0xd
imul ebx, ebx, 0x9e3779b1
sub edi, ecx
imul ecx, dword [esi + 0xc], 0x7a143589
rol edi, 0xd
add esi, 0x10
imul edi, edi, 0x9e3779b1
sub eax, ecx
rol eax, 0xd
imul eax, eax, 0x9e3779b1
cmp esi, dword [ebp - 4]
jbe 0x10019f00
rol eax, 0x12
rol edi, 0xc
add eax, edi
rol ebx, 7
mov edi, dword [ebp - 8]
add eax, ebx
rol edx, 1
add eax, edx
pop ebx
jmp 0x10019f6b
mov eax, 0x165667db
add eax, dword [ebp - 0xc]
lea ecx, [esi + 4]
cmp ecx, edi
ja 0x10019f90
imul ecx, dword [esi], 0x3d4d51c3
add esi, 4
sub eax, ecx
lea ecx, [esi + 4]
rol eax, 0x11
imul eax, eax, 0x27d4eb2f
cmp ecx, edi
jbe 0x10019f75
cmp esi, edi
jae 0x10019fad
movzx ecx, byte [esi]
inc esi
imul ecx, ecx, 0x165667b1
add ecx, eax
rol ecx, 0xb
imul eax, ecx, 0x9e3779b1
cmp esi, edi
jb 0x10019f94
mov ecx, eax
shr ecx, 0xf
xor ecx, eax
imul ecx, ecx, 0x85ebca77
pop edi
pop esi
mov eax, ecx
shr eax, 0xd
xor eax, ecx
imul ecx, eax, 0xc2b2ae3d
mov eax, ecx
shr eax, 0x10
xor eax, ecx
mov esp, ebp
pop ebp
ret
Function at 0x1002ea6d
Capabilities:
Read file on windows

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

Function at 0x1002fa8d
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x100441a8
push 0x100441a0
push str.FlsAlloc
push 0x1e
call fcn.1002f8fa
mov esi, eax
add esp, 0x10
test esi, esi
je 0x1002fac1
push dword [ebp + 8]
mov ecx, esi
call dword [0x100401ec]
call esi
jmp 0x1002fac7
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x1002fb0b
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x100441b8
push 0x100441b0
push str.FlsGetValue
push 0x20
call fcn.1002f8fa
mov esi, eax
add esp, 0x10
test esi, esi
je 0x1002fb42
push dword [ebp + 8]
mov ecx, esi
call dword [0x100401ec]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]
Function at 0x1003027d
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.1001bde0
mov eax, dword [0x10050080]
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.1002a6e2
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x100302bf
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x1003041b
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.1003d390
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 + 0x10051b30]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.10031a42
mov ecx, dword [esi*4 + 0x10051b30]
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 0x10030414
cmp eax, dword [edi + ecx + 0x24]
jne 0x10030414
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 0x10030414
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.10031a42
add esp, 0x14
test edx, edx
jl 0x10030414
jg 0x1003038a
test eax, eax
jb 0x10030414
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x10030414
jl 0x100303a4
cmp dword [ebp - 0x1008], eax
ja 0x10030414
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x100303c2
test ebx, ebx
je 0x100303fb
cmp ecx, edi
jae 0x100303fb
mov al, byte [ecx]
cmp al, 0xd
jne 0x100303dc
lea eax, [edi - 1]
cmp ecx, eax
jae 0x100303e8
cmp byte [ecx + 1], 0xa
jne 0x100303e8
inc ecx
jmp 0x100303e8
movzx eax, al
movsx eax, byte [eax + 0x10050340]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x100303c2
cmp edx, ebx
jne 0x100303c2
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x10030419
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.1001ad0c
leave
ret
Function at 0x10030efa
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 + 0x10051b30]
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 0x10030f3a
cmp byte [ebx], 0xa
jne 0x10030f3a
or byte [eax + edi + 0x28], 4
jmp 0x10030f3f
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x1003103d
mov al, byte [edx]
cmp al, 0x1a
je 0x1003101f
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x10030f6e
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x10030f93
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x10030f9d
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 0x10030f50
jmp 0x1003103d
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 0x1003101a
cmp dword [ebp - 0xc], 0
je 0x1003101a
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x10051b30]
test byte [eax + edi + 0x28], 0x48
je 0x10030ff4
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x10030fdf
mov byte [esi], dl
jmp 0x10030ff0
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x10051b30]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x1003103d
cmp byte [ebp - 1], 0xa
jne 0x10031003
cmp esi, ebx
jne 0x10031003
mov byte [esi], 0xa
jmp 0x1003103c
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.10031a60
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x1003103d
mov byte [esi], 0xd
jmp 0x1003103c
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x10051b30]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x10031039
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x1003103d
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x10031046
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 + 0x10051b30]
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 0x10031089
cmp word [esi], dx
jne 0x10031089
or byte [edi + eax + 0x28], 4
jmp 0x1003108e
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 0x100311c7
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 0x100311a7
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x100310d0
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x10031106
cmp eax, edx
jae 0x10031112
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 0x100310a8
jmp 0x100311c7
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 0x100311a3
cmp dword [ebp - 0x14], 0
je 0x100311a3
mov eax, dword [ebx*4 + 0x10051b30]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x1003117b
mov cx, word [ebp - 4]
pop eax
cmp cx, ax
je 0x100311c1
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x10051b30]
push 0xa
mov byte [edi + eax + 0x2a], cl
mov eax, dword [ebx*4 + 0x10051b30]
shr cx, 8
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x10051b30]
pop ecx
mov byte [edi + eax + 0x2c], cl
jmp 0x100311c4
pop ebx
cmp word [ebp - 4], bx
jne 0x1003118c
cmp esi, dword [ebp + 0xc]
jne 0x1003118c
mov word [esi], bx
jmp 0x100311c4
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.10031a60
add esp, 0x10
cmp word [ebp - 4], bx
je 0x100311c7
push 0xd
jmp 0x100311c0
mov ecx, dword [ebx*4 + 0x10051b30]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x100311be
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x100311c7
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 0x100346e8
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 0x10034785
push ebx
push esi
call fcn.100346b1
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.100334b5
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x10034732
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x10034784
push edi
push eax
call fcn.1002d8b3
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x10034752
call fcn.1002d4cf
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x10034783
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.100334b5
add esp, 0x20
test eax, eax
jne 0x10034771
push edi
call fcn.1002d4cf
jmp 0x10034779
push ebx
call fcn.1002d4cf
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 0x1003b9b1
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.1003b92d
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x1003bb29
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x1003bb29
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x1003bad8
jg 0x1003ba0a
test eax, eax
je 0x1003bace
push 1
push 0x1000
call fcn.1002c866
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x1003ba30
mov eax, dword [ebp + 0x14]
push 0xc
pop edi
mov byte [eax + 0x1c], 1
mov dword [eax + 0x18], edi
jmp 0x1003bac5
push 0x8000
push ebx
call fcn.1003b85e
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 0x1003ba5c
jg 0x1003ba57
cmp ecx, 0x1000
jb 0x1003ba5c
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.1002d2cf
add esp, 0x10
cmp eax, 0xffffffff
je 0x1003baa1
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 0x1003ba57
jl 0x1003ba88
test ecx, ecx
jne 0x1003ba49
push dword [ebp - 0xc]
push ebx
call fcn.1003b85e
push esi
call fcn.1002d4cf
add esp, 0xc
xor edi, edi
jmp 0x1003bb3a
cmp byte [edi + 0x24], 0
je 0x1003bab8
cmp dword [edi + 0x20], 5
jne 0x1003bab8
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x1003bac3
mov edi, dword [edi + 0x18]
jmp 0x1003bac5
xor edi, edi
push esi
call fcn.1002d4cf
pop ecx
jmp 0x1003bb3a
test ecx, ecx
jg 0x1003ba9a
jl 0x1003bad8
test eax, eax
jae 0x1003ba9a
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.10031a60
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x1003bafb
mov edi, dword [ebp + 0x14]
cmp byte [edi + 0x1c], 0
je 0x1003ba9a
jmp 0x1003bb32
push ebx
call fcn.10035054
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x1003ba9a
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 0x1003bb3a
mov edi, dword [ebp + 0x14]
cmp byte [edi + 0x1c], 0
je 0x1003bb37
mov edi, dword [edi + 0x18]
jmp 0x1003bb3a
push 0x16
pop edi
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.10031a60
add esp, 0x10
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret

Function at 0x1003d190
Capabilities:
Parse pe header

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