joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1002fc20
Capabilities:
Hash data using fnv

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
mov ebx, ecx
mov eax, 0x1fffffff
bsr ecx, eax
push esi
push edi
mov edi, 1
mov dword [ebp - 8], ebx
mov eax, edi
shl eax, cl
mov ecx, dword [ebp + 8]
cmp ecx, eax
jbe 0x1002fc51
push str.invalid_hash_bucket_count
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xlength_error_char_const__]
lea eax, [ecx - 1]
mov esi, dword [ebx + 4]
or eax, 1
mov dword [ebp - 0xc], esi
bsr ecx, eax
push esi
lea ecx, [ecx + 1]
shl edi, cl
lea ecx, [ebx + 0xc]
lea eax, [edi + edi]
push eax
call fcn.1002f260
lea eax, [edi - 1]
mov dword [ebx + 0x1c], edi
mov dword [ebx + 0x18], eax
mov eax, dword [ebx + 4]
mov eax, dword [eax]
mov ecx, eax
cmp eax, esi
je 0x1002fd5c
nop word [eax + eax]
movzx edx, byte [eax + 8]
xor edx, 0x811c9dc5
mov ecx, dword [ecx]
imul edi, edx, 0x1000193
movzx edx, byte [eax + 9]
xor edi, edx
movzx edx, byte [eax + 0xa]
imul edi, edi, 0x1000193
xor edi, edx
movzx edx, byte [eax + 0xb]
imul edi, edi, 0x1000193
xor edi, edx
mov edx, dword [ebx + 0xc]
imul edi, edi, 0x1000193
and edi, dword [ebx + 0x18]
lea edx, [edx + edi*8]
mov edi, dword [edx]
mov dword [ebp - 0x10], edx
cmp edi, esi
jne 0x1002fcdf
mov dword [edx], eax
mov dword [edx + 4], eax
jmp 0x1002fd52
mov edx, dword [edx + 4]
mov ebx, dword [eax + 8]
cmp ebx, dword [edx + 8]
jne 0x1002fd19
mov edx, dword [edx]
mov dword [ebp - 4], edx
cmp edx, eax
je 0x1002fd11
mov ebx, dword [eax + 4]
mov esi, dword [ebp - 4]
mov dword [ebx], ecx
mov edi, dword [ecx + 4]
mov dword [edi], edx
mov edx, dword [edx + 4]
mov dword [edx], eax
mov dword [esi + 4], edi
mov esi, dword [ebp - 0xc]
mov dword [ecx + 4], ebx
mov dword [eax + 4], edx
mov edx, dword [ebp - 0x10]
mov dword [edx + 4], eax
jmp 0x1002fd4f
cmp edi, edx
je 0x1002fd2c
nop dword [eax]
mov edx, dword [edx + 4]
cmp ebx, dword [edx + 8]
je 0x1002fd65
cmp edi, edx
jne 0x1002fd20
mov ebx, dword [eax + 4]
mov dword [ebp - 4], ebx
mov dword [ebx], ecx
mov ebx, dword [ecx + 4]
mov dword [ebx], edx
mov edi, dword [edx + 4]
mov dword [edi], eax
mov dword [edx + 4], ebx
mov edx, dword [ebp - 4]
mov dword [ecx + 4], edx
mov edx, dword [ebp - 0x10]
mov dword [eax + 4], edi
mov dword [edx], eax
mov ebx, dword [ebp - 8]
mov eax, ecx
cmp ecx, esi
jne 0x1002fc90
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ebx, dword [eax + 4]
mov edx, dword [edx]
mov dword [ebp - 4], edx
mov esi, edx
mov dword [ebx], ecx
mov edi, dword [ecx + 4]
mov dword [edi], edx
mov edx, dword [edx + 4]
mov dword [edx], eax
mov dword [esi + 4], edi
mov esi, dword [ebp - 0xc]
mov dword [ecx + 4], ebx
mov dword [eax + 4], edx
jmp 0x1002fd4f
Function at 0x10030ac0
Capabilities:
Enumerate threads

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x1003f040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor ebx, ebx
mov esi, ecx
push ebx
push 4
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov edi, eax
mov dword [ebp - 0x24], edi
cmp edi, 0xffffffff
je 0x10030bd3
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 0x1c
push eax
push edi
call dword [sym.imp.KERNEL32.dll_Thread32First]
test eax, eax
je 0x10030bcc
mov ebx, 1
nop dword [eax]
cmp dword [ebp - 0x20], 0x10
jb 0x10030b8f
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp dword [ebp - 0x14], eax
jne 0x10030b8f
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [ebp - 0x18], eax
je 0x10030b8f
mov edx, dword [esi]
test edx, edx
jne 0x10030b58
push 0x200
push edx
push dword [0x1003f744]
mov dword [esi + 4], 0x80
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, eax
mov dword [esi], edx
test edx, edx
je 0x10030bb4
lea edi, [esi + 8]
jmp 0x10030b82
mov eax, dword [esi + 4]
lea edi, [esi + 8]
cmp dword [edi], eax
jb 0x10030b82
add eax, eax
mov dword [esi + 4], eax
shl eax, 2
push eax
push edx
push 0
push dword [0x1003f744]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov edx, eax
test edx, edx
je 0x10030be6
mov dword [esi], edx
mov ecx, dword [edi]
mov eax, dword [ebp - 0x18]
mov dword [edx + ecx*4], eax
inc dword [edi]
mov edi, dword [ebp - 0x24]
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 0x1c
push eax
push edi
call dword [sym.imp.KERNEL32.dll_Thread32Next]
test eax, eax
jne 0x10030b10
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
je 0x10030bcc
mov eax, dword [esi]
xor ebx, ebx
test eax, eax
je 0x10030bcc
push eax
push ebx
push dword [0x1003f744]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [esi], ebx
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10034503
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp - 0x24]
jmp 0x10030bb4

Function at 0x10030bf0
Capabilities:
Suspend thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push edi
mov edi, ecx
mov dword [ebp - 4], edx
mov dword [edi], 0
mov dword [edi + 4], 0
mov dword [edi + 8], 0
call fcn.10030ac0
test eax, eax
jne 0x10030c21
mov eax, 9
pop edi
mov esp, ebp
pop ebp
ret
cmp dword [edi], 0
je 0x10030c72
push esi
xor esi, esi
cmp dword [edi + 8], esi
jbe 0x10030c6a
push ebx
nop
mov eax, dword [edi]
push dword [eax + esi*4]
push 0
push 0x5a
call dword [sym.imp.KERNEL32.dll_OpenThread]
mov ebx, eax
test ebx, ebx
je 0x10030c63
push ebx
call dword [sym.imp.KERNEL32.dll_SuspendThread]
push dword [ebp + 8]
mov edx, dword [ebp - 4]
mov ecx, ebx
call fcn.10030950
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc esi
cmp esi, dword [edi + 8]
jb 0x10030c30
pop ebx
pop esi
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret
Function at 0x10030c80
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x1003f040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
imul esi, ecx, 0x2c
mov ebx, edx
push edi
add esi, dword [0x1003f9a0]
mov eax, dword [esi]
mov cl, byte [esi + 0x14]
and cl, 1
lea edi, [eax - 5]
cmove edi, eax
movzx eax, cl
lea ecx, [ebp - 8]
push ecx
push 0x40
lea eax, [eax*2 + 5]
push eax
push edi
mov dword [ebp - 0xc], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x10030ce1
pop edi
pop esi
mov eax, 0xa
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10034503
mov esp, ebp
pop ebp
ret
test ebx, ebx
je 0x10030d02
mov byte [edi], 0xe9
mov eax, dword [esi + 4]
sub eax, edi
sub eax, 5
mov dword [edi + 1], eax
test byte [esi + 0x14], 1
je 0x10030d23
mov eax, dword [esi]
mov word [eax], 0xf9eb
jmp 0x10030d23
mov eax, dword [esi + 0xc]
test byte [esi + 0x14], 1
mov dword [edi], eax
je 0x10030d1d
mov ax, word [esi + 0x10]
mov word [edi + 4], ax
mov al, byte [esi + 0x12]
mov byte [edi + 6], al
jmp 0x10030d23
mov al, byte [esi + 0x10]
mov byte [edi + 4], al
lea eax, [ebp - 8]
push eax
push dword [ebp - 8]
push dword [ebp - 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
push dword [ebp - 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov cl, bl
xor eax, eax
add cl, cl
shl bl, 2
xor cl, byte [esi + 0x14]
and cl, 2
xor cl, byte [esi + 0x14]
xor bl, cl
and bl, 4
xor bl, cl
mov ecx, dword [ebp - 4]
pop edi
mov byte [esi + 0x14], bl
xor ecx, ebp
pop esi
pop ebx
call fcn.10034503
mov esp, ebp
pop ebp
ret
Function at 0x10030d80
Capabilities:
Resume thread

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [0x1003f9a8]
sub esp, 0x10
push ebx
push esi
xor esi, esi
mov ebx, ecx
test edx, edx
je 0x10030db4
mov eax, dword [0x1003f9a0]
add eax, 0x14
nop
movzx ecx, byte [eax]
shr ecx, 1
and ecx, 1
cmp ecx, ebx
jne 0x10030dbc
inc esi
add eax, 0x2c
cmp esi, edx
jb 0x10030da0
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
cmp esi, 0xffffffff
je 0x10030e72
test ebx, ebx
lea ecx, [ebp - 0x10]
setne al
or edx, 0xffffffff
push eax
call fcn.10030bf0
add esp, 4
mov dword [ebp - 4], eax
test eax, eax
jne 0x10030e72
mov ecx, dword [0x1003f9a8]
push edi
cmp esi, ecx
jae 0x10030e2a
imul edi, esi, 0x2c
mov eax, dword [0x1003f9a0]
movzx eax, byte [edi + eax + 0x14]
shr eax, 1
and eax, 1
cmp eax, ebx
je 0x10030e1f
mov edx, ebx
mov ecx, esi
call fcn.10030c80
mov dword [ebp - 4], eax
test eax, eax
jne 0x10030e2a
mov ecx, dword [0x1003f9a8]
jmp 0x10030e22
mov eax, dword [ebp - 4]
inc esi
add edi, 0x2c
cmp esi, ecx
jb 0x10030df4
mov ebx, dword [ebp - 0x10]
test ebx, ebx
je 0x10030e71
xor esi, esi
cmp dword [ebp - 8], esi
jbe 0x10030e5f
push dword [ebx + esi*4]
push 0
push 0x5a
call dword [sym.imp.KERNEL32.dll_OpenThread]
mov edi, eax
test edi, edi
je 0x10030e59
push edi
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc esi
cmp esi, dword [ebp - 8]
jb 0x10030e38
push ebx
push 0
push dword [0x1003f744]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x10031c40
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x1003f040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea eax, [ebp - 8]
push edi
push eax
push 0x40
mov ebx, ecx
mov edi, edx
push 6
push ebx
call esi
lea eax, [ebp - 0xc]
mov byte [ebx + 5], 0x90
push eax
push dword [ebp - 8]
sub edi, ebx
mov byte [ebx], 0xe9
push 6
sub edi, 5
push ebx
mov dword [ebx + 1], edi
call esi
mov ecx, dword [ebp - 4]
mov al, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10034503
mov esp, ebp
pop ebp
ret

Function at 0x10031d00
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x1003f040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push edi
mov edi, dword [ebp + 8]
mov eax, ecx
lea ecx, [ebp - 8]
mov dword [ebp - 0xc], eax
push ecx
push 0x40
push edi
push eax
mov ebx, edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
push edi
push ebx
mov ebx, dword [ebp - 0xc]
push ebx
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
lea eax, [ebp - 8]
push eax
push dword [ebp - 8]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.10034503
mov esp, ebp
pop ebp
ret
Function at 0x100337a0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
cmp dword [ebp + 0xc], 1
jne 0x10033804
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push 1
push 0x1fffff
mov dword [0x1003f888], eax
call dword [sym.imp.KERNEL32.dll_OpenProcess]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push 0x104
push 0x1003f748
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DisableThreadLibraryCalls]
push 0
push 0
push dword [ebp + 8]
push 0x100336e0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
je 0x10033804
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
pop ebp
ret 0xc
Function at 0x10033da0
Capabilities:
Encode data using xor
Hash data using fnv

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1fffffff
sub esp, 0x10
bsr ecx, eax
push ebx
push esi
mov esi, 1
mov eax, esi
shl eax, cl
mov ecx, dword [ebp + 8]
push edi
cmp ecx, eax
jbe 0x10033dcc
push str.invalid_hash_bucket_count
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xlength_error_char_const__]
lea eax, [ecx - 1]
or eax, 1
bsr ecx, eax
mov eax, dword [0x1003f8b4]
push eax
mov dword [ebp - 8], eax
lea ecx, [ecx + 1]
shl esi, cl
mov ecx, 0x1003f8bc
lea eax, [esi + esi]
push eax
call fcn.10033850
lea eax, [esi - 1]
mov dword [0x1003f8cc], esi
mov esi, dword [0x1003f8b4]
mov dword [0x1003f8c8], eax
mov eax, dword [ebp - 8]
mov esi, dword [esi]
mov edi, esi
cmp esi, eax
je 0x10033efc
cmp dword [esi + 0x1c], 0xf
lea ecx, [esi + 8]
mov edi, dword [edi]
mov edx, dword [ecx + 0x10]
mov dword [ebp - 0x10], edi
mov dword [ebp - 0xc], edx
mov dword [ebp - 4], ecx
jbe 0x10033e30
mov edx, dword [ecx]
mov dword [ebp - 4], edx
xor edx, edx
mov ebx, 0x811c9dc5
cmp dword [ecx + 0x10], edx
jbe 0x10033e59
mov eax, dword [ebp - 4]
mov edi, dword [ebp - 0xc]
movzx ecx, byte [eax + edx]
inc edx
xor ecx, ebx
imul ebx, ecx, 0x1000193
cmp edx, edi
jb 0x10033e42
mov edi, dword [ebp - 0x10]
mov eax, dword [ebp - 8]
and ebx, dword [0x1003f8c8]
mov ecx, dword [0x1003f8bc]
lea ecx, [ecx + ebx*8]
mov dword [ebp - 4], ecx
cmp dword [ecx], eax
jne 0x10033e76
mov dword [ecx], esi
mov dword [ecx + 4], esi
jmp 0x10033ef2
mov ebx, dword [ecx + 4]
lea eax, [ebx + 8]
push eax
lea eax, [esi + 8]
push eax
call fcn.10031ae0
test al, al
jne 0x10033eb0
mov ebx, dword [ebx]
cmp ebx, esi
je 0x10033ea8
mov edx, dword [esi + 4]
mov dword [edx], edi
mov ecx, dword [edi + 4]
mov dword [ecx], ebx
mov eax, dword [ebx + 4]
mov dword [eax], esi
mov dword [ebx + 4], ecx
mov dword [edi + 4], edx
mov dword [esi + 4], eax
mov eax, dword [ebp - 4]
mov dword [eax + 4], esi
jmp 0x10033eef
mov eax, dword [ebp - 4]
cmp dword [eax], ebx
je 0x10033ed2
mov ebx, dword [ebx + 4]
lea eax, [ebx + 8]
push eax
lea eax, [esi + 8]
push eax
call fcn.10031ae0
test al, al
je 0x10033f05
mov eax, dword [ebp - 4]
cmp dword [eax], ebx
jne 0x10033eb7
mov edx, dword [esi + 4]
mov dword [edx], edi
mov ecx, dword [edi + 4]
mov dword [ecx], ebx
mov eax, dword [ebx + 4]
mov dword [eax], esi
mov dword [ebx + 4], ecx
mov dword [edi + 4], edx
mov dword [esi + 4], eax
mov eax, dword [ebp - 4]
mov dword [eax], esi
mov eax, dword [ebp - 8]
mov esi, edi
cmp edi, eax
jne 0x10033e14
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov edx, dword [esi + 4]
mov ebx, dword [ebx]
mov dword [edx], edi
mov ecx, dword [edi + 4]
mov dword [ecx], ebx
mov eax, dword [ebx + 4]
mov dword [eax], esi
mov dword [ebx + 4], ecx
mov dword [edi + 4], edx
mov dword [esi + 4], eax
jmp 0x10033eef
Function at 0x422a7d
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
pushal
call 0x422a8c
pop dword [ebp - 0x18]
mov eax, 0x422a8c
sub dword [ebp - 0x18], eax
push 0x40
push 0x1000
push 0x3c4df
push 0
mov eax, 0x9b67e76a
sub eax, 0x9b259552
add eax, dword [ebp - 0x18]
call dword [eax]
mov ecx, 0xe5616ce2
add ecx, 0x1a9ed547
mov ebx, eax
mov edx, 0x435400
add edx, dword [ebp - 0x18]
mov edi, 0x868d5d97
add edi, 0xd74b8569
xor dword [ebp - 0x10], 0x69e7162d
mov esi, dword [edx]
sub dword [ebp - 0x14], 0xcd764032
sub esi, edi
add dword [ebp - 0xc], 0x8199a0
mov dword [ebx], esi
add dword [ebp - 0xc], ebx
add ebx, 0x2b67469c
sub ebx, 0x2b674698
add edx, 0xbb743278
sub edx, 0xbb743274
loop 0x422ae0
add eax, 0xfb77
mov ebx, eax
add eax, 0x20bb27d4
add eax, 0xdf44d831
mov ecx, 0xac587790
add ecx, 0x53e78870
add ecx, dword [ebp - 0x18]
call ebx
leave
ret

Function at 0x96a058
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.0096a1a8
push ebx
mov ebx, esp
push ebx
mov esi, dword [ebx + 8]
mov edi, dword [ebx + 0x10]
cld
mov dl, 0x80
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
mov ebx, 2
add dl, dl
jne 0x96a07e
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x96a06a
add dl, dl
jne 0x96a089
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x96a0dc
xor eax, eax
add dl, dl
jne 0x96a096
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x96a17d
add dl, dl
jne 0x96a0a5
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x96a0b0
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x96a0bb
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x96a0c6
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
je 0x96a0d2
push edi
mov eax, eax
sub edi, eax
mov al, byte [edi]
pop edi
mov byte [edi], al
inc edi
mov ebx, 2
jmp 0x96a075
mov eax, 1
add dl, dl
jne 0x96a0ea
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x96a0f5
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x96a0e1
sub eax, ebx
mov ebx, 1
jne 0x96a128
mov ecx, 1
add dl, dl
jne 0x96a10e
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x96a119
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x96a105
push esi
mov esi, edi
sub esi, ebp
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x96a075
dec eax
shl eax, 8
mov al, byte [esi]
inc esi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x96a13f
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x96a14a
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x96a136
cmp eax, 0x7d00
jae 0x96a16d
cmp eax, 0x500
jb 0x96a168
inc ecx
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x96a075
cmp eax, 0x7f
ja 0x96a170
add ecx, 2
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x96a075
mov al, byte [esi]
inc esi
xor ecx, ecx
shr al, 1
je 0x96a19e
adc ecx, 2
mov ebp, eax
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
mov ebx, 1
jmp 0x96a075
pop ebx
sub edi, dword [ebx + 0x10]
mov eax, edi
pop ebx
ret 0x10
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub esp, 0x1c
xor eax, eax
cmp word [0x400000], 0x5a4d
mov dword [0x4b4054], 1
mov dword [0x4b4050], 1
mov dword [0x4b404c], 1
jne 0x401056
mov edx, dword [0x40003c]
cmp dword [edx + 0x400000], 0x4550
lea ecx, [edx + 0x400000]
je 0x4010b0
mov dword [0x4b400c], eax
mov eax, dword [0x4b4060]
test eax, eax
je 0x4010a0
mov dword [esp], 2
call sym.___set_app_type
call sym.___p__fmode
mov edx, dword [0x4b4074]
mov dword [eax], edx
call sym.___p__commode
mov edx, dword [0x4b405c]
mov dword [eax], edx
call sym.__setargv
cmp dword [0x457ad4], 1
je 0x4010e0
xor eax, eax
add esp, 0x1c
ret
mov dword [esp], 1
call sym.___set_app_type
jmp 0x401070
movzx edx, word [ecx + 0x18]
cmp dx, 0x10b
je 0x4010f8
cmp dx, 0x20b
jne 0x401056
cmp dword [ecx + 0x84], 0xe
jbe 0x401056
mov edx, dword [ecx + 0xf8]
xor eax, eax
test edx, edx
setne al
jmp 0x401056
mov dword [esp], sym.__matherr
call sym.___mingw_setusermatherr
xor eax, eax
add esp, 0x1c
ret
cmp dword [ecx + 0x74], 0xe
jbe 0x401056
mov ecx, dword [ecx + 0xe8]
xor eax, eax
test ecx, ecx
setne al
jmp 0x401056
Function at 0x407410
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp], 2
lea ebx, [esp + 0x24]
call sym.___acrt_iob_func
mov dword [esp + 8], 0x1b
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.Mingw_w64_runtime_failure:_n
call sym._fwrite
mov dword [esp], 2
call sym.___acrt_iob_func
mov edx, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], edx
call sym._vfprintf
call sym._abort
lea esi, [esi]

Function at 0x407470
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x30
mov esi, dword [0x4b4068]
test esi, esi
jle 0x407590
mov eax, dword [0x4b406c]
xor ecx, ecx
add eax, 0xc
mov edx, dword [eax]
cmp ebx, edx
jb 0x4074a4
mov edi, dword [eax + 4]
add edx, dword [edi + 8]
cmp ebx, edx
jb 0x407527
add ecx, 1
add eax, 0x14
cmp ecx, esi
jne 0x407490
mov dword [esp], ebx
call sym.___mingw_GetSectionForAddress
mov edi, eax
test eax, eax
je 0x4075b7
mov eax, dword [0x4b406c]
lea ebx, [esi + esi*4]
shl ebx, 2
add eax, ebx
mov dword [eax + 0x10], edi
mov dword [eax], 0
call sym.__GetPEImageBase
mov edx, dword [0x4b406c]
add eax, dword [edi + 0xc]
mov dword [edx + ebx + 0xc], eax
lea edx, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x407597
mov eax, dword [esp + 0x28]
lea edx, [eax - 0x40]
and edx, 0xffffffbf
je 0x407520
lea edx, [eax - 4]
and edx, 0xfffffffb
jne 0x407530
add dword [0x4b4068], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
cmp eax, 2
mov edx, 4
mov eax, 0x40
mov ecx, dword [esp + 0x20]
cmove eax, edx
mov edx, dword [esp + 0x14]
add ebx, dword [0x4b406c]
mov dword [ebx + 8], ecx
mov dword [ebx + 4], edx
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
jne 0x407520
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call sym.___report_error
lea esi, [esi]
lea esi, [esi]
xor esi, esi
jmp 0x4074ae
mov eax, dword [0x4b406c]
mov eax, dword [eax + ebx + 0xc]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call sym.___report_error
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call sym.___report_error
lea esi, [esi]
nop
Function at 0x407ad0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x4b4084
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x4b407c]
sub esp, 4
test ebx, ebx
je 0x407b25
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
lea esi, [esi]
mov eax, dword [ebx]
mov dword [esp], eax
call ebp
sub esp, 4
mov esi, eax
call edi
test eax, eax
jne 0x407b1e
test esi, esi
je 0x407b1e
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x407b00
mov dword [esp], 0x4b4084
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x407e60
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [0x400000], 0x5a4d
jne 0x407e85
mov ecx, dword [0x40003c]
cmp dword [ecx + 0x400000], 0x4550
lea edx, [ecx + 0x400000]
je 0x407e90
ret
cmp word [ecx + 0x400018], 0x10b
jne 0x407e85
push esi
movzx eax, word [ecx + 0x400014]
push ebx
movzx esi, word [ecx + 0x400006]
mov ebx, dword [esp + 0xc]
lea eax, [edx + eax + 0x18]
sub ebx, 0x400000
test si, si
je 0x407ed8
xor ecx, ecx
mov edx, dword [eax + 0xc]
cmp ebx, edx
jb 0x407ece
add edx, dword [eax + 8]
cmp ebx, edx
jb 0x407eda
add ecx, 1
add eax, 0x28
cmp ecx, esi
jne 0x407ec0
xor eax, eax
pop ebx
pop esi
ret
Function at 0x1003518
Capabilities:
Query environment variable
Set environment variable
Write file on windows

Disassembly:
push ecx
push ebx
xor ebx, ebx
push ebx
push ebx
push 0x1002388
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
jne 0x10035e3
push esi
mov esi, 0x100afa0
push esi
push 0x1002378
push 0x100ad60
call fcn.01002a1f
push ebx
push 0x4000002
push 1
push ebx
push 3
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edx, eax
cmp edx, 0xffffffff
mov dword [0x100a024], edx
je 0x10035e2
push ebp
push edi
mov ebp, 0x100a5a0
xor eax, eax
push ebx
mov ecx, 0xc5
mov edi, ebp
rep stosd dword es:[edi], eax
lea eax, [esp + 0x14]
push eax
mov edi, 0x314
push edi
push ebp
push edx
mov dword [0x100a5a0], 0x6e776453
mov dword [0x100a5a4], 0x10000
mov dword [0x100a5a8], 0xc0000013
mov byte [0x100a7b0], bl
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10035cd
cmp dword [esp + 0x10], edi
jne 0x10035cd
push esi
push 0x1002388
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
jmp 0x10035e0
push dword [0x100a024]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [0x100a024], 0xffffffff
pop edi
pop ebp
pop esi
pop ebx
pop ecx
ret