joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401550
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x1c
test ecx, ecx
mov dword [esp + 0x14], ebx
mov ebx, eax
mov eax, edx
mov dword [esp + 0x18], esi
mov esi, ecx
je 0x401588
mov edx, dword [ebx]
mov dword [esp], eax
lea edx, [edx*4 + 4]
mov dword [esp + 4], edx
call sub.msvcrt.dll_realloc
test eax, eax
je 0x401594
mov edx, dword [ebx]
mov dword [eax + edx*4], esi
add edx, 1
mov dword [ebx], edx
mov ebx, dword [esp + 0x14]
mov esi, dword [esp + 0x18]
add esp, 0x1c
ret
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0xe
mov dword [esp + 4], 1
mov dword [esp], 0x413044
add eax, 0x40
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
mov dword [esp], 1
call sub.msvcrt.dll_exit
nop
lea esi, [esi]

Function at 0x401f60
Capabilities:
Write file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x3c
mov ebx, dword [esp + 0x50]
lea eax, [esp + 0x2c]
mov dword [esp + 8], eax
lea eax, [esp + 0x28]
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.00406bc0
mov edi, dword [esp + 0x28]
test eax, eax
mov dword [esp + 0x1c], eax
je 0x402043
mov dword [esp + 4], 4
mov dword [esp], edi
call sub.msvcrt.dll_calloc
mov esi, eax
test edi, edi
jne 0x401fc8
jmp 0x401fe7
call sub.msvcrt.dll_rand
mov edx, eax
sar edx, 0x1f
idiv dword [esp + 0x28]
lea ebp, [esi + edx*4]
mov eax, dword [ebp]
test eax, eax
je 0x401ff1
mov dword [esp], ebx
call fcn.00406b20
cmp eax, 1
jle 0x401fb0
mov dword [esp], esi
call sub.msvcrt.dll_free
add esp, 0x3c
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], ebx
call fcn.00406b20
jmp 0x401fd5
mov eax, dword [esp + 0x1c]
mov edx, dword [eax + edx*4]
mov eax, dword [esp + 0x2c]
mov dword [esp], ebx
mov dword [esp + 4], edx
mov dword [esp + 0x18], edx
mov dword [esp + 8], eax
call fcn.00401b80
mov edx, dword [esp + 0x18]
test eax, eax
je 0x401fc8
mov eax, dword [sym.imp.msvcrt.dll__iob]
sub edi, 1
mov dword [esp + 8], edx
mov dword [esp + 4], str.failed_to_retrieve_from__s_n
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [ebp], 1
jmp 0x401fa5
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x1d
mov dword [esp + 4], 1
mov dword [esp], str.no_URLs_available_from_zsync_
add eax, 0x40
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
add esp, 0x3c
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x402320
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x1c
mov eax, dword [eax + 0x1128]
test eax, eax
jne 0x4023b0
mov eax, dword [ebx + 0x112c]
mov ebp, dword [sym.imp.WS2_32.dll_recv]
mov edi, 0x1000
jmp 0x40235b
call dword [sym.imp.msvcrt.dll__errno]
cmp dword [eax], 4
jne 0x402400
mov eax, dword [ebx + 0x112c]
mov edx, edi
sub edx, eax
lea eax, [ebx + eax + 0x128]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x110]
mov dword [esp + 0xc], 0
mov dword [esp + 8], edx
mov dword [esp], eax
call ebp
sub esp, 0x10
cmp eax, 0xffffffff
mov esi, eax
je 0x402346
test eax, eax
js 0x402400
mov edx, esi
sar edx, 0x1f
add dword [ebx + 0x112c], eax
add dword [ebx + 0x1130], eax
adc dword [ebx + 0x1134], edx
add esp, 0x1c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [ebx + 0x112c]
sub edx, eax
lea eax, [ebx + eax + 0x128]
mov dword [esp + 4], eax
lea eax, [ebx + 0x128]
mov dword [esp + 8], edx
mov dword [esp], eax
call sub.msvcrt.dll_memmove
mov eax, dword [ebx + 0x112c]
sub eax, dword [ebx + 0x1128]
mov ebp, dword [sym.imp.WS2_32.dll_recv]
mov dword [ebx + 0x1128], 0
mov dword [ebx + 0x112c], eax
jmp 0x40233f
mov dword [esp], 0x413a06
call sub.msvcrt.dll_perror
jmp 0x4023a6

Function at 0x402770
Capabilities:
Connect socket
Resolve dns

Disassembly:
push ebp
xor eax, eax
push edi
push esi
push ebx
sub esp, 0x4c
mov ebp, dword [esp + 0x60]
mov dword [esp + eax + 0x1c], 0
add eax, 4
cmp eax, 0x20
jb 0x40277d
lea eax, [esp + 0x3c]
mov dword [esp + 0xc], eax
lea eax, [esp + 0x1c]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x64]
mov dword [esp + 0x24], 1
mov dword [esp], ebp
mov dword [esp + 4], eax
call dword [sym.imp.WS2_32.dll_getaddrinfo]
sub esp, 0x10
test eax, eax
jne 0x402862
mov ebx, dword [esp + 0x3c]
mov esi, 0xffffffff
test ebx, ebx
je 0x402815
mov edi, dword [sym.imp.WS2_32.dll_connect]
mov eax, dword [ebx + 0xc]
mov dword [esp + 8], eax
mov eax, dword [ebx + 8]
mov dword [esp + 4], eax
mov eax, dword [ebx + 4]
mov dword [esp], eax
call fcn.00405890
sub esp, 0xc
cmp eax, 0xffffffff
mov esi, eax
je 0x402830
mov eax, dword [ebx + 0x10]
mov dword [esp + 8], eax
mov eax, dword [ebx + 0x18]
mov dword [esp], esi
mov dword [esp + 4], eax
call edi
sub esp, 0xc
test eax, eax
js 0x402850
mov ebx, dword [esp + 0x3c]
mov dword [esp], ebx
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
sub esp, 4
add esp, 0x4c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], str.socket
call sub.msvcrt.dll_perror
mov ebx, dword [ebx + 0x1c]
test ebx, ebx
jne 0x4027d4
mov ebx, dword [esp + 0x3c]
mov esi, 0xffffffff
jmp 0x402815
mov dword [esp], ebp
call sub.msvcrt.dll_perror
mov dword [esp], esi
call sub.msvcrt.dll__close
jmp 0x40283c
mov dword [esp], ebp
mov esi, 0xffffffff
call sub.msvcrt.dll_perror
jmp 0x402821
Function at 0x404670
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x5c
cmp dword [esp + 0x74], 2
mov ebx, dword [esp + 0x70]
je 0x4047d0
fld dword [ebx + 0x10]
lea ecx, [esp + 0x38]
fnstcw word [esp + 0x26]
fld qword [0x4140d8]
fmul st(1)
movzx eax, word [esp + 0x26]
mov ah, 0xc
mov word [esp + 0x24], ax
xor eax, eax
fldcw word [esp + 0x24]
fistp dword [esp + 0x20]
fldcw word [esp + 0x26]
mov edx, dword [esp + 0x20]
test edx, edx
jg 0x4046c4
jmp 0x4046d5
cmp edx, eax
jle 0x4046d0
mov byte [ecx + eax], 0x23
add eax, 1
cmp eax, 0x13
jle 0x4046c0
cmp eax, 0x14
je 0x40474a
mov edi, eax
mov ebp, eax
lea edx, [ecx + eax]
not edi
neg edx
add edi, 0x15
and edx, 3
cmp edx, edi
cmova edx, edi
test edx, edx
je 0x404703
nop
mov byte [ecx + eax], 0x2d
add eax, 1
mov esi, eax
sub esi, ebp
cmp edx, esi
ja 0x4046f0
cmp edx, edi
je 0x40474a
sub edi, edx
mov esi, edi
shr esi, 2
mov dword [esp + 0x1c], edi
lea edi, [esi*4]
test edi, edi
je 0x404737
add ebp, edx
xor edx, edx
add ebp, ecx
nop
mov dword [ebp + edx*4], 0x2d2d2d2d
add edx, 1
cmp esi, edx
ja 0x404720
add eax, edi
cmp dword [esp + 0x1c], edi
je 0x40474a
add eax, ecx
lea edx, [esp + 0x4c]
lea esi, [esi]
mov byte [eax], 0x2d
add eax, 1
cmp eax, edx
jne 0x404740
fstp qword [esp + 8]
mov dword [esp + 4], ecx
mov byte [esp + 0x4c], 0
mov dword [esp], str._r_s__.1f__
call sub.msvcrt.dll_printf
mov eax, dword [ebx + 8]
mov edx, dword [ebx + 0xc]
sub eax, dword [ebx]
sbb edx, dword [ebx + 4]
fild qword [ebx + 0x18]
mov dword [esp + 0x2c], edx
mov dword [esp + 0x28], eax
fild qword [esp + 0x28]
fadd dword [0x4140f0]
mov dword [esp], str.__.1f_kBps
fdivp st(1)
fld qword [0x4140e8]
fmulp st(1)
fstp qword [esp + 4]
call sub.msvcrt.dll_printf
mov edx, dword [esp + 0x74]
mov eax, str.aborted_____n
test edx, edx
mov edx, str._________n
cmovne eax, edx
mov dword [esp], eax
call sub.msvcrt.dll_puts
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
mov dword [esp], eax
call sub.msvcrt.dll_fflush
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
fld dword [0x4140e0]
lea eax, [esp + 0x38]
fstp qword [esp + 8]
mov dword [esp + 0x38], 0x23232323
mov dword [esp + 0x3c], 0x23232323
mov dword [esp + 0x40], 0x23232323
mov dword [esp + 0x44], 0x23232323
mov dword [esp + 0x48], 0x23232323
mov byte [esp + 0x4c], 0
mov dword [esp + 4], eax
mov dword [esp], str._r_s__.1f__
call sub.msvcrt.dll_printf
mov eax, dword [ebx + 8]
mov edx, dword [ebx + 0xc]
sub eax, dword [ebx]
sbb edx, dword [ebx + 4]
fild qword [ebx + 0x18]
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edx
fild qword [esp + 0x28]
fadd dword [0x4140f0]
mov dword [esp], str.__.1f_kBps
fdivp st(1)
fld qword [0x4140e8]
fmulp st(1)
fstp qword [esp + 4]
call sub.msvcrt.dll_printf
mov eax, str.DONE_____n
jmp 0x4047b0
Function at 0x404860
Capabilities:
Encode data using base64

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov ebx, dword [esp + 0x30]
mov dword [esp], ebx
call sub.msvcrt.dll_strlen
mov edx, 0xaaaaaaab
mov esi, eax
lea eax, [eax + 2]
mul edx
shr edx, 1
lea eax, [edx*4 + 1]
mov dword [esp], eax
call sub.msvcrt.dll_malloc
test eax, eax
mov ebp, eax
je 0x404919
cmp esi, 2
mov ecx, eax
jbe 0x40490c
movsx edx, byte [ebx]
sub esi, 3
movsx edi, byte [ebx + 1]
shl edx, 0x10
shl edi, 8
or edx, edi
movsx edi, byte [ebx + 2]
add ebx, 3
or edx, edi
mov edi, edx
sar edi, 0x12
and edi, 0x3f
movzx edi, byte [edi + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov eax, edi
mov edi, edx
sar edi, 0xc
and edi, 0x3f
movzx edi, byte [edi + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [ecx], al
mov eax, edi
mov edi, edx
sar edi, 6
and edx, 0x3f
and edi, 0x3f
movzx edx, byte [edx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
movzx edi, byte [edi + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [ecx + 1], al
mov byte [ecx + 3], dl
mov eax, edi
mov byte [ecx + 2], al
add ecx, 4
cmp esi, 2
ja 0x4048a1
cmp esi, 1
je 0x404970
cmp esi, 2
je 0x404923
mov byte [ecx], 0
add esp, 0x1c
mov eax, ebp
pop ebx
pop esi
pop edi
pop ebp
ret
movsx edx, byte [ebx + 1]
movsx ebx, byte [ebx]
mov byte [ecx + 3], 0x3d
shl edx, 8
shl ebx, 0x10
or edx, ebx
mov ebx, edx
sar ebx, 0x12
and ebx, 0x3f
movzx ebx, byte [ebx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [ecx], bl
mov ebx, edx
sar ebx, 0xc
sar edx, 6
and ebx, 0x3f
and edx, 0x3f
movzx ebx, byte [ebx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
movzx edx, byte [edx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [ecx + 1], bl
mov byte [ecx + 2], dl
add ecx, 4
jmp 0x404916
movsx edx, byte [ebx]
mov byte [ecx + 3], 0x3d
mov byte [ecx + 2], 0x3d
shl edx, 0x10
mov ebx, edx
sar ebx, 0x12
sar edx, 0xc
and ebx, 0x3f
and edx, 0x3f
movzx ebx, byte [ebx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
movzx edx, byte [edx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [ecx], bl
mov byte [ecx + 1], dl
add ecx, 4
jmp 0x404916
Function at 0x405b10
Capabilities:
Delete file
Get common file path

Disassembly:
sub esp, 0x44c
mov dword [esp + 0x444], esi
lea esi, [esp + 0x2c]
mov dword [esp + 0x440], ebx
xor ebx, ebx
mov dword [esp + 0x448], edi
mov dword [esp + 4], esi
mov dword [esp], 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
sub eax, 1
sub esp, 8
cmp eax, 0x102
ja 0x405bee
lea edi, [esp + 0x236]
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0
mov dword [esp + 4], 0x4143e2
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
sub esp, 0x10
test eax, eax
je 0x405bee
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x4000080
mov dword [esp + 0x10], 2
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0xc0000000
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
sub esp, 0x1c
cmp eax, 0xffffffff
mov esi, eax
je 0x405c20
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__open_osfhandle]
test eax, eax
mov edi, eax
js 0x405c10
mov dword [esp + 4], 0x4143c1
mov dword [esp], eax
call fcn.00405910
test eax, eax
mov ebx, eax
je 0x405c2e
mov eax, ebx
mov esi, dword [esp + 0x444]
mov ebx, dword [esp + 0x440]
mov edi, dword [esp + 0x448]
add esp, 0x44c
ret
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
jmp 0x405bee
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
sub esp, 4
jmp 0x405bee
mov dword [esp], edi
call dword [sym.imp.msvcrt.dll__close_1]
jmp 0x405bee

Function at 0x405c40
Capabilities:
Read file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
push eax
mov eax, 0x1088
call fcn.0040fba0
sub esp, eax
mov ebp, edx
mov eax, dword [esp + 0x1088]
lea esi, [esp + 0x1018]
mov dword [esp], esi
lea edi, [esp + 0x18]
mov ebx, eax
call fcn.00408980
jmp 0x405c81
mov dword [esp + 8], eax
mov dword [esp + 4], edi
mov dword [esp], esi
call fcn.004089c0
mov dword [esp + 8], 0x1000
mov dword [esp + 4], edi
mov dword [esp], ebp
call sub.msvcrt.dll__read
cmp eax, 0
jg 0x405c71
jne 0x405d00
mov dword [esp + 4], esi
lea ebp, [esp + 0x107c]
xor esi, esi
mov dword [esp], edi
call fcn.00408b50
lea eax, [esi + esi]
add eax, dword [ebx]
mov dword [esp + 8], ebp
mov dword [esp + 4], 0x414445
mov dword [esp], eax
call sub.msvcrt.dll_sscanf
movzx eax, byte [edi + esi]
cmp eax, dword [esp + 0x107c]
jne 0x405cf0
add esi, 1
cmp esi, 0x14
jne 0x405cb1
mov eax, 1
add esp, 0x108c
pop ebx
pop esi
pop edi
pop ebp
ret
add esp, 0x108c
mov eax, 0xffffffff
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], str.read
call sub.msvcrt.dll_perror
mov eax, 0xffffffff
jmp 0x405ce4
Function at 0x406d90
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [esp + 4]
mov eax, dword [eax]
mov dword [esp + 4], eax
jmp fcn.0040a9f0

Function at 0x406dd0
Capabilities:
Move file

Disassembly:
sub esp, 0x2c
mov dword [esp + 0x24], edi
mov edi, dword [esp + 0x30]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x28], ebp
mov ebp, dword [esp + 0x34]
mov dword [esp + 0x20], esi
mov ebx, dword [edi + 0x34]
test ebx, ebx
je 0x406e40
mov dword [esp + 4], ebp
mov dword [esp], ebx
call sub.msvcrt.dll_rename
test eax, eax
mov esi, eax
je 0x406e26
mov dword [esp], str.rename
call sub.msvcrt.dll_perror
mov eax, esi
mov ebx, dword [esp + 0x1c]
mov esi, dword [esp + 0x20]
mov edi, dword [esp + 0x24]
mov ebp, dword [esp + 0x28]
add esp, 0x2c
ret
mov dword [esp], ebx
call sub.msvcrt.dll_free
mov dword [esp], ebp
call sub.msvcrt.dll__strdup
mov dword [edi + 0x34], eax
jmp 0x406e10
mov eax, dword [edi]
mov dword [esp], eax
call fcn.00409810
mov ebx, eax
mov dword [edi + 0x34], eax
jmp 0x406df2
Function at 0x408980
Capabilities:
Hash data using sha1

Disassembly:
mov eax, dword [esp + 4]
mov dword [eax + 0x18], 0
mov dword [eax + 0x1c], 0
mov dword [eax], 0x67452301
mov dword [eax + 4], 0xefcdab89
mov dword [eax + 8], 0x98badcfe
mov dword [eax + 0xc], 0x10325476
mov dword [eax + 0x10], 0xc3d2e1f0
ret

Function at 0x409940
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x2c
mov ebx, dword [esp + 0x40]
mov ebp, dword [ebx + 8]
cmp ebp, 0xffff
jg 0x409a85
mov ecx, 0xf
mov eax, 2
jmp 0x40996b
cmp edi, 4
jle 0x409978
mov edi, ecx
mov edx, eax
sub ecx, 1
shl edx, cl
cmp edx, ebp
jg 0x409966
mov eax, 2
mov ecx, edi
shl eax, cl
lea esi, [eax - 1]
mov dword [esp + 0x18], esi
mov edx, esi
mov dword [ebx + 0x34], edx
mov dword [esp + 4], 4
mov dword [esp], eax
call sub.msvcrt.dll_calloc
xor edx, edx
test eax, eax
mov esi, eax
mov dword [ebx + 0x3c], eax
je 0x409a7b
lea ecx, [edi + 3]
mov eax, 2
shl eax, cl
lea ecx, [eax - 1]
mov dword [ebx + 0x40], ecx
mov dword [esp + 0x1c], ecx
mov dword [esp + 4], 1
mov dword [esp], eax
mov dword [esp + 0x10], edx
call sub.msvcrt.dll_calloc
test eax, eax
mov dword [ebx + 0x44], eax
je 0x409aa0
test ebp, ebp
mov edx, 1
jle 0x409a7b
lea eax, [ebp - 1]
mov edi, dword [ebx + 0x3c]
lea edx, [eax + eax*2]
shl edx, 3
mov dword [esp + 0x14], edx
jmp 0x409a59
movzx ecx, word [edx + 0x1e]
shl ecx, 3
xor ecx, ebp
mov ebp, dword [esp + 0x18]
sub dword [esp + 0x14], 0x18
and ebp, ecx
mov esi, dword [esi + ebp*4]
mov dword [edx], esi
mov esi, dword [ebx + 0x34]
and esi, ecx
mov dword [edi + esi*4], edx
mov edx, dword [esp + 0x1c]
mov esi, 1
and edx, ecx
and ecx, 7
shr edx, 3
add edx, dword [ebx + 0x44]
shl esi, cl
mov ecx, esi
or byte [edx], cl
test eax, eax
je 0x409a76
mov edx, dword [ebx + 0x34]
sub eax, 1
mov edi, dword [ebx + 0x3c]
mov ecx, dword [ebx + 0x40]
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x14]
mov esi, edi
mov dword [esp + 0x1c], ecx
add edx, dword [ebx + 0x38]
cmp dword [ebx + 0x1c], 1
movzx ecx, word [ebx + 0x14]
movzx ebp, word [edx + 6]
jg 0x409a00
and cx, word [edx + 4]
movzx ecx, cx
shl ecx, 3
jmp 0x409a07
mov edx, 1
add esp, 0x2c
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0x18], 0x1ffff
mov eax, 0x20000
mov edi, 0x10
mov edx, dword [esp + 0x18]
jmp 0x40998a
mov dword [esp], esi
call sub.msvcrt.dll_free
mov edx, dword [esp + 0x10]
mov dword [ebx + 0x3c], 0
jmp 0x409a7b
Function at 0x409ac0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push esi
push ebx
mov ebx, dword [esp + 0xc]
mov eax, dword [esp + 0x10]
mov ecx, dword [ebx + 0x38]
cmp dword [ebx + 0x1c], 1
lea edx, [eax + eax*2]
movzx eax, word [ebx + 0x14]
lea edx, [ecx + edx*8]
mov ecx, dword [ebx + 0x3c]
movzx esi, word [edx + 6]
jle 0x409b18
movzx eax, word [edx + 0x1e]
shl eax, 3
xor eax, esi
and eax, dword [ebx + 0x34]
lea ecx, [ecx + eax*4]
mov eax, dword [ecx]
test eax, eax
jne 0x409b08
jmp 0x409b15
mov ecx, eax
mov eax, dword [eax]
test eax, eax
je 0x409b15
cmp edx, eax
jne 0x409b00
cmp dword [ebx + 0x24], edx
je 0x409b24
mov eax, dword [eax]
mov dword [ecx], eax
pop ebx
pop esi
ret
and ax, word [edx + 4]
movzx eax, ax
shl eax, 3
jmp 0x409aeb
mov eax, dword [edx]
mov dword [ebx + 0x24], eax
mov eax, dword [ecx]
jmp 0x409b11
Function at 0x40a540
Capabilities:
Read file on windows

Disassembly:
push esi
push ebx
sub esp, 0x44
mov eax, dword [esp + 0x50]
mov esi, dword [esp + 0x5c]
mov ebx, dword [esp + 0x60]
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__get_osfhandle]
cmp eax, 0xffffffff
je 0x405827
lea edx, [esp + 0x28]
mov dword [esp + 0x10], edx
lea edx, [esp + 0x3c]
mov dword [esp + 0xc], edx
mov edx, dword [esp + 0x58]
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], ebx
mov dword [esp], eax
mov dword [esp + 8], edx
mov edx, dword [esp + 0x54]
mov dword [esp + 4], edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, 0xffffffff
sub esp, 0x14
test eax, eax
cmovne edx, dword [esp + 0x3c]
add esp, 0x44
mov eax, edx
pop ebx
pop esi
ret
mov edx, 0xffffffff
jmp 0x40581f
push ebx
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
mov ebx, dword [esp + 0x14]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 8]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], ebx
mov eax, dword [eax + 0x68]
mov dword [esp + 8], eax
pop ebx
jmp 0x4057c0
Function at 0x40ac40
Capabilities:
Hash data with md5

Disassembly:
mov eax, dword [esp + 4]
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0
mov dword [eax], 0x67452301
mov dword [eax + 4], 0xefcdab89
mov dword [eax + 8], 0x98badcfe
mov dword [eax + 0xc], 0x10325476
ret
Function at 0x40df20
Capabilities:
Compute adler32 checksum

Disassembly:
push ebp
mov eax, 1
push edi
push esi
push ebx
sub esp, 4
mov esi, dword [esp + 0x1c]
mov ebx, dword [esp + 0x18]
test esi, esi
je 0x40e06f
mov edx, dword [esp + 0x20]
movzx ecx, bx
shr ebx, 0x10
test edx, edx
je 0x40e068
nop
cmp dword [esp + 0x20], 0x15b0
mov ebp, 0x15b0
cmovbe ebp, dword [esp + 0x20]
sub dword [esp + 0x20], ebp
cmp ebp, 0xf
jle 0x40e01f
sub ebp, 0x10
mov dword [esp], ebp
shr ebp, 4
mov eax, ebp
shl eax, 4
lea edx, [esi + eax + 0x10]
mov eax, esi
movzx edi, byte [eax]
add ecx, edi
movzx edi, byte [eax + 1]
add ebx, ecx
add ecx, edi
movzx edi, byte [eax + 2]
add ebx, ecx
add ecx, edi
movzx edi, byte [eax + 3]
add ebx, ecx
add ecx, edi
movzx edi, byte [eax + 4]
add ebx, ecx
add ecx, edi
movzx edi, byte [eax + 5]
add ebx, ecx
add ecx, edi
movzx edi, byte [eax + 6]
add ebx, ecx
add ecx, edi
movzx edi, byte [eax + 7]
add ebx, ecx
add ecx, edi
movzx edi, byte [eax + 8]
add ebx, ecx
add ecx, edi
movzx edi, byte [eax + 9]
add ebx, ecx
add ecx, edi
movzx edi, byte [eax + 0xa]
add ebx, ecx
add ecx, edi
movzx edi, byte [eax + 0xb]
add ebx, ecx
add ecx, edi
movzx edi, byte [eax + 0xc]
add ebx, ecx
add ecx, edi
movzx edi, byte [eax + 0xd]
add ebx, ecx
add ecx, edi
movzx edi, byte [eax + 0xe]
add ebx, ecx
add ecx, edi
movzx edi, byte [eax + 0xf]
add eax, 0x10
add ebx, ecx
add ecx, edi
add ebx, ecx
cmp eax, edx
jne 0x40df83
lea eax, [ebp + 1]
shl eax, 4
add esi, eax
mov eax, dword [esp]
shl ebp, 4
sub eax, ebp
mov ebp, eax
test ebp, ebp
je 0x40e038
mov edx, ebp
mov eax, esi
movzx edi, byte [eax]
add eax, 1
add ecx, edi
add ebx, ecx
sub edx, 1
jne 0x40e027
add esi, ebp
mov eax, 0x80078071
mul ecx
mov eax, 0x80078071
shr edx, 0xf
imul edx, edx, 0xfff1
sub ecx, edx
mul ebx
mov eax, dword [esp + 0x20]
shr edx, 0xf
imul edx, edx, 0xfff1
sub ebx, edx
test eax, eax
jne 0x40df50
mov eax, ebx
shl eax, 0x10
or eax, ecx
add esp, 4
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x40ef40
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x1b
lea ebx, [esp + 0x24]
mov dword [esp + 4], 1
mov dword [esp], str.Mingw_w64_runtime_failure:_n
add eax, 0x40
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
mov eax, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
jmp fcn.0040efa0

Function at 0x40efa0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, ecx
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x4c
mov ecx, dword [0x41806c]
mov dword [esp + 0x1c], edx
test ecx, ecx
jle 0x40f0a9
mov eax, dword [0x418068]
xor esi, esi
mov edx, dword [eax + 4]
cmp ebx, edx
jb 0x40efd9
mov edi, dword [eax + 8]
add edx, dword [edi + 8]
cmp ebx, edx
jb 0x40f05c
add esi, 1
add eax, 0xc
cmp esi, ecx
jne 0x40efc4
mov dword [esp], ebx
call fcn.0040f4a0
test eax, eax
mov edi, eax
je 0x40f0d0
lea edx, [esi + esi*2]
mov esi, dword [0x418068]
shl edx, 2
add esi, edx
mov dword [esi + 8], eax
mov dword [esi], 0
mov dword [esp + 0x18], edx
call fcn.0040f580
mov edx, dword [esp + 0x18]
add eax, dword [edi + 0xc]
mov dword [esi + 4], eax
lea eax, [esp + 0x24]
mov dword [esp + 4], eax
mov eax, dword [0x418068]
mov dword [esp + 8], 0x1c
mov eax, dword [eax + edx + 4]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
mov edx, dword [esp + 0x18]
je 0x40f0b0
mov eax, dword [esp + 0x38]
cmp eax, 4
jne 0x40f078
add dword [0x41806c], 1
mov eax, dword [esp + 0x1c]
mov dword [esp + 8], ebp
mov dword [esp], ebx
mov dword [esp + 4], eax
call sub.msvcrt.dll_memcpy
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
cmp eax, 0x40
je 0x40f055
mov eax, dword [esp + 0x30]
add edx, dword [0x418068]
mov dword [esp + 8], 0x40
mov dword [esp + 4], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0xc], edx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
jmp 0x40f055
xor esi, esi
jmp 0x40efe3
mov eax, dword [0x418068]
mov eax, dword [eax + edx + 4]
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.0040ef40
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call fcn.0040ef40

Function at 0x40f390
Capabilities:
Parse pe header

Disassembly:
mov edx, dword [esp + 4]
xor eax, eax
cmp word [edx], 0x5a4d
je 0x40f3a0
repz ret
add edx, dword [edx + 0x3c]
cmp dword [edx], 0x4550
jne 0x40f39d
xor eax, eax
cmp word [edx + 0x18], 0x10b
sete al
ret
Function at 0x40f960
Capabilities:
Get thread local storage value

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

Function at 0x410c10
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [esp + 4]
mov edx, dword [esp + 8]
mov ecx, dword [esp + 0xc]
mov dword [esp + 8], 0
mov dword [esp + 0xc], 0
mov dword [esp + 4], 0
jmp fcn.00410630