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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100a5e8d
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x100bc008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xorps xmm0, xmm0
mov dword [ebp - 0x30], 0
xor edx, edx
mov eax, 0xf
movups xmmword [ebp - 0x28], xmm0
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x14], eax
mov byte [ebp - 0x28], dl
mov dword [ebp - 4], edx
mov edi, dword [ecx]
mov ecx, dword [ecx + 4]
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x3c], ecx
cmp edi, ecx
je 0x10072acd
mov ecx, dword [ebp - 0x28]
lea esi, [ebp - 0x28]
cmp esi, edi
je 0x10072a17
cmp dword [edi + 0x14], 0x10
mov eax, edi
jb 0x10072a02
mov eax, dword [edi]
push dword [edi + 0x10]
lea ecx, [ebp - 0x28]
push eax
call fcn.10020ad0
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x14]
lea esi, [edx - 3]
cmp esi, edx
ja 0x10072a31
cmp dword [ebp - 0x14], 0x10
lea eax, [ebp - 0x28]
mov dword [ebp - 0x18], esi
cmovae eax, ecx
mov byte [eax + esi], 0
jmp 0x10072a76
mov ecx, esi
sub eax, edx
sub ecx, edx
mov dword [ebp - 0x2c], ecx
cmp ecx, eax
ja 0x10072a63
cmp dword [ebp - 0x14], 0x10
mov dword [ebp - 0x18], esi
lea esi, [ebp - 0x28]
cmovae esi, dword [ebp - 0x28]
push ecx
add esi, edx
push 0
push esi
call sub.VCRUNTIME140.dll_memset
mov eax, dword [ebp - 0x2c]
add esp, 0xc
mov byte [esi + eax], 0
jmp 0x10072a76
push 0
push ecx
mov byte [ebp - 0x38], 0
push dword [ebp - 0x38]
push ecx
lea ecx, [ebp - 0x28]
call fcn.100344a0
cmp dword [ebp - 0x14], 0x10
lea eax, [ebp - 0x28]
mov edx, dword [ebp - 0x18]
mov esi, 0x811c9dc5
cmovae eax, dword [ebp - 0x28]
xor ecx, ecx
test edx, edx
je 0x10072aa5
mov edi, eax
movzx eax, byte [ecx + edi]
inc ecx
xor eax, esi
imul esi, eax, 0x1000193
cmp ecx, edx
jb 0x10072a91
mov edi, dword [ebp - 0x34]
cmp esi, dword [ebp + 8]
jne 0x10072ab5
mov esi, dword [ebp - 0x30]
test esi, esi
je 0x10072ac8
dec esi
mov dword [ebp - 0x30], esi
add edi, 0x1c
mov dword [ebp - 0x34], edi
cmp edi, dword [ebp - 0x3c]
je 0x10072acd
mov eax, dword [ebp - 0x14]
jmp 0x100729ee
mov edi, dword [edi + 0x18]
jmp 0x10072acf
xor edi, edi
mov eax, dword [ebp - 0x14]
mov esi, dword [ebp - 0x28]
cmp eax, 0x10
jb 0x10072b07
lea ecx, [eax + 1]
mov eax, esi
cmp ecx, 0x1000
jb 0x10072afd
mov esi, dword [eax - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x10072afd
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push esi
call fcn.1009d0b5
add esp, 8
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1009cb56
mov esp, ebp
pop ebp
ret 0xc
Function at 0x10072b30
Capabilities:
Encode data using xor
Hash data using fnv

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100a5e8d
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x100bc008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xorps xmm0, xmm0
mov dword [ebp - 0x30], 1
xor edx, edx
mov eax, 0xf
movups xmmword [ebp - 0x28], xmm0
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x14], eax
mov byte [ebp - 0x28], dl
mov dword [ebp - 4], edx
mov edi, dword [ecx]
mov ecx, dword [ecx + 4]
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x3c], ecx
cmp edi, ecx
je 0x10072c6d
mov ecx, dword [ebp - 0x28]
lea esi, [ebp - 0x28]
cmp esi, edi
je 0x10072bb7
cmp dword [edi + 0x14], 0x10
mov eax, edi
jb 0x10072ba2
mov eax, dword [edi]
push dword [edi + 0x10]
lea ecx, [ebp - 0x28]
push eax
call fcn.10020ad0
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x14]
lea esi, [edx - 3]
cmp esi, edx
ja 0x10072bd1
cmp dword [ebp - 0x14], 0x10
lea eax, [ebp - 0x28]
mov dword [ebp - 0x18], esi
cmovae eax, ecx
mov byte [eax + esi], 0
jmp 0x10072c16
mov ecx, esi
sub eax, edx
sub ecx, edx
mov dword [ebp - 0x2c], ecx
cmp ecx, eax
ja 0x10072c03
cmp dword [ebp - 0x14], 0x10
mov dword [ebp - 0x18], esi
lea esi, [ebp - 0x28]
cmovae esi, dword [ebp - 0x28]
push ecx
add esi, edx
push 0
push esi
call sub.VCRUNTIME140.dll_memset
mov eax, dword [ebp - 0x2c]
add esp, 0xc
mov byte [esi + eax], 0
jmp 0x10072c16
push 0
push ecx
mov byte [ebp - 0x38], 0
push dword [ebp - 0x38]
push ecx
lea ecx, [ebp - 0x28]
call fcn.100344a0
cmp dword [ebp - 0x14], 0x10
lea eax, [ebp - 0x28]
mov edx, dword [ebp - 0x18]
mov esi, 0x811c9dc5
cmovae eax, dword [ebp - 0x28]
xor ecx, ecx
test edx, edx
je 0x10072c45
mov edi, eax
movzx eax, byte [ecx + edi]
inc ecx
xor eax, esi
imul esi, eax, 0x1000193
cmp ecx, edx
jb 0x10072c31
mov edi, dword [ebp - 0x34]
cmp esi, dword [ebp + 8]
jne 0x10072c55
mov esi, dword [ebp - 0x30]
test esi, esi
je 0x10072c68
dec esi
mov dword [ebp - 0x30], esi
add edi, 0x1c
mov dword [ebp - 0x34], edi
cmp edi, dword [ebp - 0x3c]
je 0x10072c6d
mov eax, dword [ebp - 0x14]
jmp 0x10072b8e
mov edi, dword [edi + 0x18]
jmp 0x10072c6f
xor edi, edi
mov eax, dword [ebp - 0x14]
mov esi, dword [ebp - 0x28]
cmp eax, 0x10
jb 0x10072ca7
lea ecx, [eax + 1]
mov eax, esi
cmp ecx, 0x1000
jb 0x10072c9d
mov esi, dword [eax - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x10072c9d
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push esi
call fcn.1009d0b5
add esp, 8
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1009cb56
mov esp, ebp
pop ebp
ret 0xc

Function at 0x10074580
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
cmp dword [ebp + 0xc], 1
jne 0x100745ab
push 0
push 0
push 0
push 0x100308e0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
je 0x100745ab
mov eax, 1
pop ebp
ret 0xc
xor eax, eax
pop ebp
ret 0xc
Function at 0x10085d50
Capabilities:
Encode data using xor
Hash data using fnv

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
test ebx, ebx
je 0x10085ef1
mov eax, dword [ebx]
mov ecx, ebx
mov eax, dword [eax + 0x280]
call eax
test al, al
je 0x10085ef1
mov eax, dword [0x10153d64]
cmp dword [eax + 0x174], 0xffffffff
je 0x10085ef1
mov eax, dword [0x101540a0]
add eax, 0xffffff85
xor eax, 0xccb3e73f
cmp dword [eax + ebx], 0
mov eax, dword [0x10154064]
setle cl
add eax, 0xffffff94
xor eax, 0xccb3e730
xor edi, edi
mov byte [eax + ebx], cl
mov eax, dword [0x10154058]
add eax, 0xffffff97
xor eax, 0xccb3e72d
mov dword [eax + ebx + 0xc], 0
mov eax, dword [0x1015405c]
add eax, 0xffffff96
xor eax, 0xccb3e72e
mov dword [eax + ebx + 0xc], 0
mov ecx, dword [0x10154060]
lea eax, [ecx - 0x6b]
xor eax, 0xccb3e72f
mov edx, dword [eax + ebx + 0xc]
mov dword [ebp - 4], edx
test edx, edx
je 0x10085e3e
lea eax, [ecx - 0x6b]
xor eax, 0xccb3e72f
mov eax, dword [eax + ebx]
mov esi, dword [eax + edi*4]
lea ebx, [eax + edi*4]
test esi, esi
je 0x10085e36
or eax, 0xffffffff
lock xadd dword [esi + 4], eax
jne 0x10085e2a
mov eax, dword [esi]
mov ecx, esi
mov eax, dword [eax + 4]
call eax
test al, al
je 0x10085e27
mov eax, dword [esi]
mov ecx, esi
push 1
call dword [eax]
mov edx, dword [ebp - 4]
mov dword [ebx], 0
mov ecx, dword [0x10154060]
mov ebx, dword [ebp + 8]
inc edi
cmp edi, edx
jb 0x10085df3
lea eax, [ecx - 0x6b]
xor eax, 0xccb3e72f
lea ecx, [ebx + 8]
push 0
mov dword [eax + ebx + 0xc], 0
mov eax, dword [ebx + 8]
mov eax, dword [eax + 0x1c]
call eax
mov eax, dword [ebx + 8]
lea ecx, [ebx + 8]
push 0
mov eax, dword [eax + 0x14]
call eax
mov edx, dword [0x10153d78]
xor ebx, ebx
mov dword [ebp - 4], edx
mov eax, dword [edx + 0x28]
mov dword [ebp - 8], eax
test eax, eax
je 0x10085ee2
nop dword [eax]
mov eax, dword [edx + 0x1c]
lea ecx, [ebx*4]
mov dword [ebp - 0xc], ecx
mov ecx, dword [ecx + eax]
mov eax, dword [ecx]
mov eax, dword [eax + 0x30]
call eax
mov esi, eax
mov edi, 0x811c9dc5
xor ecx, ecx
inc ecx
cmp byte [ecx + esi], 0
jne 0x10085ea0
xor edx, edx
test ecx, ecx
je 0x10085ec9
nop dword [eax]
movsx eax, byte [edx + esi]
inc edx
xor eax, edi
imul edi, eax, 0x1000193
cmp edx, ecx
jb 0x10085eb0
cmp edi, 0x79705c5e
je 0x10085ed4
inc ebx
cmp ebx, dword [ebp - 8]
jae 0x10085ee2
mov edx, dword [ebp - 4]
jmp 0x10085e80
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0xc]
mov eax, dword [eax + 0x1c]
mov ecx, dword [ecx + eax]
jmp 0x10085ee4
xor ecx, ecx
push 0
push dword [ebp + 8]
push 0
call dword [0x10153e90]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x1008bf20
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
movzx eax, byte [esi]
xor al, byte [ecx]
and al, 1
xor byte [ecx], al
mov dl, byte [esi]
xor dl, byte [ecx]
and dl, 2
xor dl, byte [ecx]
mov byte [ecx], dl
movzx eax, byte [esi]
xor al, dl
and al, 4
xor al, dl
mov byte [ecx], al
mov eax, dword [esi + 4]
mov dword [ecx + 4], eax
mov eax, dword [esi + 8]
mov dword [ecx + 8], eax
movq xmm0, qword [esi + 0xc]
movq qword [ecx + 0xc], xmm0
mov eax, dword [esi + 0x14]
mov dword [ecx + 0x14], eax
movq xmm0, qword [esi + 0x18]
movq qword [ecx + 0x18], xmm0
mov eax, dword [esi + 0x20]
mov dword [ecx + 0x20], eax
mov eax, dword [esi + 0x24]
mov dword [ecx + 0x24], eax
mov eax, dword [esi + 0x28]
mov dword [ecx + 0x28], eax
mov eax, dword [esi + 0x2c]
mov dword [ecx + 0x2c], eax
mov eax, dword [esi + 0x30]
mov dword [ecx + 0x30], eax
mov eax, dword [esi + 0x34]
mov dword [ecx + 0x34], eax
mov eax, dword [esi + 0x38]
mov dword [ecx + 0x38], eax
mov eax, dword [esi + 0x3c]
mov dword [ecx + 0x3c], eax
movq xmm0, qword [esi + 0x40]
movq qword [ecx + 0x40], xmm0
mov eax, dword [esi + 0x48]
mov dword [ecx + 0x48], eax
movq xmm0, qword [esi + 0x4c]
movq qword [ecx + 0x4c], xmm0
mov eax, dword [esi + 0x54]
mov dword [ecx + 0x54], eax
mov eax, dword [esi + 0x58]
mov dword [ecx + 0x58], eax
movq xmm0, qword [esi + 0x5c]
movq qword [ecx + 0x5c], xmm0
mov eax, dword [esi + 0x64]
mov dword [ecx + 0x64], eax
movq xmm0, qword [esi + 0x68]
movq qword [ecx + 0x68], xmm0
mov eax, dword [esi + 0x70]
mov dword [ecx + 0x70], eax
mov eax, dword [esi + 0x74]
mov dword [ecx + 0x74], eax
movq xmm0, qword [esi + 0x78]
movq qword [ecx + 0x78], xmm0
mov eax, dword [esi + 0x80]
mov dword [ecx + 0x80], eax
movq xmm0, qword [esi + 0x84]
movq qword [ecx + 0x84], xmm0
mov eax, dword [esi + 0x8c]
mov dword [ecx + 0x8c], eax
movq xmm0, qword [esi + 0x90]
movq qword [ecx + 0x90], xmm0
mov eax, dword [esi + 0x98]
mov dword [ecx + 0x98], eax
mov eax, dword [esi + 0x9c]
mov dword [ecx + 0x9c], eax
mov eax, dword [esi + 0xa0]
mov dword [ecx + 0xa0], eax
mov eax, dword [esi + 0xa4]
mov dword [ecx + 0xa4], eax
movzx eax, byte [esi + 0xa8]
mov byte [ecx + 0xa8], al
movq xmm0, qword [esi + 0xac]
movq qword [ecx + 0xac], xmm0
mov eax, dword [esi + 0xb4]
mov dword [ecx + 0xb4], eax
mov eax, ecx
pop esi
pop ebp
ret 4
Function at 0x401c34
Capabilities:
Create thread

Disassembly:
push ecx
push ebx
push esi
lea eax, [esp + 8]
xor esi, esi
push eax
push esi
push dword [esp + 0x1c]
push dword [esp + 0x1c]
push 0x1000
push esi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ebx, eax
test ebx, ebx
je 0x401ccf
push edi
push 0x4d8100
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [0x4d80e8]
test edi, edi
je 0x401ca2
push ebp
push esi
lea ebp, [edi + 8]
push dword [ebp]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x401c9b
push dword [ebp]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [edi]
push ebp
push 0x4d80e8
call fcn.00409c2a
pop ecx
pop ecx
jmp 0x401c9d
mov edi, dword [edi]
test edi, edi
jne 0x401c70
pop ebp
mov esi, dword [0x4d6050]
push 0x10
push 0x4d80e8
lea eax, [esi + 1]
mov dword [0x4d6050], eax
call fcn.00409bfb
pop ecx
pop ecx
push 0x4d8100
mov dword [eax], ebx
mov dword [eax + 4], esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
mov eax, esi
pop esi
pop ebx
pop ecx
ret 8

Function at 0x402eda
Capabilities:
Accept command line arguments

Disassembly:
sub esp, 0x14
push ebx
push ebp
push esi
push edi
push dword [0x4d813c]
call fcn.00407b26
mov esi, eax
or ebp, 0xffffffff
mov dword [esp + 0x20], esi
mov dword [esp + 0x14], ebp
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov ebx, dword [esp + 0x28]
mov ecx, eax
movzx edx, word [ecx]
test dx, dx
je 0x40300d
mov eax, dword [esi]
mov esi, edx
mov edx, dword [esp + 0x28]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], 0x20
push 0x22
pop edi
movzx eax, si
cmp si, word [esp + 0x18]
jne 0x402f40
push 0x20
pop esi
add ecx, 2
movzx eax, word [ecx]
cmp ax, si
je 0x402f35
mov dword [esp + 0x10], 1
cmp ax, di
jne 0x402f7a
add ecx, 2
mov edi, ecx
movzx eax, word [ecx]
mov esi, eax
test ax, ax
je 0x402fd8
push 0x22
mov edx, eax
pop ebx
movzx esi, dx
cmp dx, bx
je 0x402fd4
add ecx, 2
movzx eax, word [ecx]
mov edx, eax
mov esi, eax
test ax, ax
jne 0x402f61
jmp 0x402fd4
test ax, ax
je 0x402fe8
push 0x22
pop ebx
push 0x20
mov edi, ecx
movzx eax, ax
pop ebp
movzx esi, ax
cmp ax, bp
je 0x402fd0
add ecx, 2
movzx eax, word [ecx]
mov edx, eax
cmp ax, bx
jne 0x402fc5
add ecx, 2
movzx eax, word [ecx]
mov edx, eax
test ax, ax
je 0x402fc5
mov esi, eax
movzx edx, si
cmp si, bx
je 0x402fc5
add ecx, 2
movzx eax, word [ecx]
mov esi, eax
mov edx, eax
test ax, ax
jne 0x402fae
movzx eax, dx
movzx esi, dx
test dx, dx
jne 0x402f8a
mov ebp, dword [esp + 0x14]
mov ebx, dword [esp + 0x28]
mov edx, ecx
test si, si
je 0x402fe2
add ecx, 2
mov eax, dword [esp + 0x10]
jmp 0x402fec
xor eax, eax
xor edi, edi
cmp dword [esp + 0x1c], ebp
jne 0x402ff6
test ebx, ebx
jne 0x403015
test eax, eax
je 0x402fff
inc ebp
mov dword [esp + 0x14], ebp
movzx eax, word [ecx]
mov esi, eax
test ax, ax
jne 0x402f25
test ebx, ebx
jne 0x403029
mov eax, ebp
jmp 0x40302e
test edi, edi
je 0x403029
mov eax, dword [esp + 0x20]
sub edx, edi
sar edx, 1
mov dword [ebx], edx
inc dword [eax]
mov eax, edi
jmp 0x40302e
and dword [ebx], 0
mov eax, ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
Function at 0x403710
Capabilities:
Get thread local storage value

Disassembly:
cmp dword [0x4d815c], 0
jne 0x40371e
call fcn.004037a0
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
push edi
push dword [0x4d8158]
call esi
mov edx, eax
test edx, edx
jne 0x403745
call fcn.004037a0
push dword [0x4d8158]
call esi
mov edx, eax
mov ebx, dword [edx]
mov esi, dword [edx + 4]
mov ebp, dword [esp + 0x14]
inc ebp
mov edi, dword [edx + ebx*4 + 0x4c]
mov eax, dword [edx + ebx*4 + 8]
mov ecx, dword [edx + esi*4 + 8]
ror edi, 0xd
add edi, dword [edx + esi*4 + 0x4c]
dec esi
ror eax, 5
add eax, ecx
mov dword [edx + ebx*4 + 8], edi
mov dword [edx + ebx*4 + 0x4c], eax
sub ebx, 1
jns 0x40377a
mov ebx, 0x10
test esi, esi
jns 0x403783
mov esi, 0x10
mov dword [edx], ebx
mov eax, edi
mov dword [edx + 4], esi
test ebp, ebp
je 0x403792
mul ebp
mov eax, edx
pop edi
pop esi
pop ebp
pop ebx
ret 4

Function at 0x4037a0
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
cmp dword [0x4d815c], 0
jne 0x4037be
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x4d8158], eax
mov dword [0x4d815c], 1
push ebx
push ebp
push esi
push edi
push 0x90
push 0
push dword [0x4d7b78]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
push dword [0x4d8158]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor esi, eax
cmp dword [0x4d815c], 0
jne 0x403800
call fcn.004037a0
push dword [0x4d8158]
mov ebx, dword [sym.imp.KERNEL32.dll_TlsGetValue]
call ebx
mov edi, eax
test edi, edi
jne 0x403823
call fcn.004037a0
push dword [0x4d8158]
call ebx
mov edi, eax
lea edx, [edi + 8]
mov ebx, 0x11
jmp 0x403830
imul eax, esi, 0x53a9b4fb
lea edx, [edx + 4]
mov ecx, 1
mov esi, 1
sub ecx, eax
imul eax, ecx, 0x53a9b4fb
mov dword [edx + 0x40], ecx
sub esi, eax
mov dword [edx - 4], esi
sub ebx, 1
jne 0x403830
mov dword [edi], ebx
lea ebp, [ebx + 0x1f]
mov dword [edi + 4], 0xa
mov esi, 0xa
lea esp, [esp]
mov ecx, dword [edi + ebx*4 + 8]
mov eax, dword [edi + ebx*4 + 0x4c]
mov edx, dword [edi + esi*4 + 8]
ror eax, 0xd
add eax, dword [edi + esi*4 + 0x4c]
dec esi
ror ecx, 5
add ecx, edx
mov dword [edi + ebx*4 + 8], eax
mov dword [edi + ebx*4 + 0x4c], ecx
add ebx, 0xffffffff
jns 0x40389b
mov ebx, 0x10
test esi, esi
jns 0x4038a4
mov esi, 0x10
mov dword [edi], ebx
mov dword [edi + 4], esi
sub ebp, 1
jne 0x403870
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x4038c0
Capabilities:
Get thread local storage value

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
mov edi, dword [esp + 0x10]
cmp edi, esi
jbe 0x4038d4
mov edi, esi
mov dword [esp + 0x10], edi
sub esi, edi
cmp dword [0x4d815c], 0
jne 0x4038e4
call fcn.004037a0
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_TlsGetValue]
push ebp
push dword [0x4d8158]
call ebx
mov edx, eax
test edx, edx
jne 0x403909
call fcn.004037a0
push dword [0x4d8158]
call ebx
mov edx, eax
mov ebp, dword [edx]
inc esi
mov ebx, dword [edx + 4]
mov eax, dword [edx + ebp*4 + 0x4c]
mov ecx, dword [edx + ebx*4 + 8]
ror eax, 0xd
add eax, dword [edx + ebx*4 + 0x4c]
dec ebx
mov dword [esp + 0x14], eax
mov eax, dword [edx + ebp*4 + 8]
mov edi, dword [esp + 0x14]
ror eax, 5
add eax, ecx
mov dword [edx + ebp*4 + 8], edi
mov edi, dword [esp + 0x18]
mov dword [edx + ebp*4 + 0x4c], eax
sub ebp, 1
jns 0x403946
mov ebp, 0x10
test ebx, ebx
jns 0x40394f
mov ebx, 0x10
mov eax, dword [esp + 0x14]
mov dword [edx], ebp
mov dword [edx + 4], ebx
pop ebp
pop ebx
test esi, esi
je 0x403968
mul esi
lea eax, [edx + edi]
pop edi
pop esi
ret 8
add eax, edi
pop edi
pop esi
ret 8

Function at 0x4042af
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x190
push fcn.00404202
push 0x10
push 0x2c
call fcn.004156a0
push 0
push 0
push 8
mov dword [0x4d8190], eax
call fcn.00407b91
cmp word [0x4d8188], 0
mov dword [0x4d8198], eax
jne 0x404388
lea eax, [esp]
push eax
push 0x101
call dword [sym.imp.WS2_32.dll_WSAStartup]
neg eax
push str.ws2_32.dll
sbb eax, eax
inc eax
mov word [0x4d8188], ax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [0x4d8194], eax
test eax, eax
je 0x404388
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x4ae088
push eax
call esi
push 0x4ae094
push dword [0x4d8194]
mov dword [0x4d8178], eax
call esi
push str.getnameinfo
push dword [0x4d8194]
mov dword [0x4d817c], eax
call esi
push str.WSAStringToAddressA
push dword [0x4d8194]
mov dword [0x4d8180], eax
call esi
cmp dword [0x4d8178], 0
mov dword [0x4d8184], eax
pop esi
je 0x404388
cmp dword [0x4d817c], 0
je 0x404388
cmp dword [0x4d8180], 0
je 0x404388
test eax, eax
je 0x404388
mov dword [0x4d818c], 1
add esp, 0x190
ret

Function at 0x4044d8
Capabilities:
Get hostname
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x100
lea eax, [ebp - 0x100]
push esi
push edi
mov edi, dword [ebp + 8]
xor esi, esi
push 0xff
push eax
mov dword [0x4d81c0], esi
mov dword [0x4d81bc], esi
mov dword [0x4d81a0], edi
mov dword [0x4d81c4], esi
call dword [sym.imp.WS2_32.dll_gethostname]
test eax, eax
jne 0x404584
cmp edi, 0x10000000
jne 0x404560
cmp dword [0x4d818c], esi
je 0x404584
mov eax, dword [0x4d819c]
test eax, eax
je 0x40453c
push eax
call dword [0x4d817c]
mov dword [0x4d819c], esi
push 0x4d819c
push esi
push esi
lea eax, [ebp - 0x100]
push eax
call dword [0x4d8178]
test eax, eax
jne 0x404584
mov eax, dword [0x4d819c]
mov dword [0x4d81c4], eax
jmp 0x404581
lea eax, [ebp - 0x100]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x404584
push 0x10
push eax
push 0x4d81b0
call fcn.00414ba0
add esp, 0xc
xor esi, esi
inc esi
pop edi
mov eax, esi
pop esi
leave
ret 4
Function at 0x40472c
Capabilities:
Get socket status
Receive data
Receive data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x90c
xor eax, eax
inc eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
mov esi, ebx
cmp dword [edi], eax
jne 0x4047af
mov esi, dword [edi + 8]
mov dword [ebp - 0x10c], eax
lea eax, [ebp - 8]
push eax
push ebx
push ebx
lea eax, [ebp - 0x10c]
mov dword [ebp - 0x108], esi
push eax
lea eax, [esi + 1]
mov dword [ebp - 8], ebx
push eax
mov dword [ebp - 4], ebx
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
js 0x4047a6
je 0x4047ab
lea eax, [ebp - 0x10c]
push eax
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4047ab
lea eax, [ebp + 8]
push eax
push 0x4004667f
push esi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
jne 0x4047a6
cmp dword [ebp + 8], ebx
je 0x4047a6
push 2
jmp 0x4047a8
push 4
pop esi
jmp 0x4047fc
mov esi, ebx
jmp 0x4047fc
push ebx
push ebx
push ebx
push 0x800
lea eax, [ebp - 0x90c]
push eax
push dword [edi + 0x28]
call dword [sym.imp.WS2_32.dll_recvfrom]
mov dword [ebp + 8], eax
test eax, eax
jle 0x4047fc
push 2
pop esi
push eax
push ebx
push dword [0x4d7b78]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [ebp + 8]
push ecx
mov dword [edi + 0x30], ecx
lea ecx, [ebp - 0x90c]
push ecx
push eax
mov dword [edi + 0x2c], eax
mov dword [edi + 0x34], eax
call fcn.00414ba0
add esp, 0xc
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 4
Function at 0x4048b6
Capabilities:
Receive data
Receive data on socket

Disassembly:
sub esp, 0x840
push ebx
push ebp
push esi
push edi
push dword [0x4d8198]
xor ebp, ebp
mov dword [esp + 0x14], ebp
call fcn.00407b26
mov ebx, dword [esp + 0x854]
mov edi, eax
xor eax, eax
mov dword [esp + 0x20], edi
inc eax
cmp word [ebx + 0x20], ax
jne 0x404927
push ebp
push ebp
push dword [ebx]
call dword [sym.imp.WS2_32.dll_accept]
mov esi, eax
cmp esi, 0xffffffff
je 0x404a89
lea eax, [ebx + 0x28]
push 0x18
push eax
call fcn.00409bfb
pop ecx
pop ecx
mov ecx, eax
xor eax, eax
inc eax
mov dword [esp + 0x10], eax
mov dword [ecx], eax
mov dword [ecx + 8], esi
mov dword [ecx + 0xc], ebx
mov eax, dword [ebx + 0x24]
mov dword [edi + 4], eax
mov dword [edi], ecx
jmp 0x404a89
cmp word [ebx + 0x22], bp
je 0x40495a
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0x1c
push eax
lea eax, [esp + 0x38]
push eax
push ebp
push 0x800
lea eax, [esp + 0x60]
push eax
push dword [ebx]
call dword [sym.imp.WS2_32.dll_recvfrom]
mov edi, eax
mov dword [esp + 0x14], edi
jmp 0x404985
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], 0x10
push eax
lea eax, [esp + 0x28]
push eax
push ebp
push 0x800
lea eax, [esp + 0x60]
push eax
push dword [ebx]
call dword [sym.imp.WS2_32.dll_recvfrom]
mov edi, eax
mov dword [esp + 0x14], eax
test edi, edi
jle 0x404a89
mov esi, dword [ebx + 0x28]
mov dword [esp + 0x10], 2
jmp 0x4049c5
lea eax, [esi + 0xc]
cmp word [ebx + 0x22], bp
je 0x4049ad
push dword [esp + 0x18]
lea ecx, [esp + 0x38]
jmp 0x4049b5
push dword [esp + 0x1c]
lea ecx, [esp + 0x28]
push ecx
push eax
call fcn.0041920c
add esp, 0xc
test eax, eax
je 0x4049cb
mov esi, dword [esi]
test esi, esi
jne 0x40499a
jmp 0x4049d7
mov eax, esi
push 8
pop ecx
lea ebp, [eax + ecx]
test esi, esi
jne 0x404a1a
lea eax, [ebx + 0x28]
push 0x40
push eax
call fcn.00409bfb
mov ebp, eax
mov eax, dword [esp + 0x18]
pop ecx
pop ecx
mov dword [ebp], eax
lea edi, [ebp + 4]
mov dword [ebp + 0x24], ebx
mov al, byte [ebx + 0x22]
mov byte [ebp + 0x20], al
xor eax, eax
cmp word [ebx + 0x22], ax
je 0x404a10
push 7
pop ecx
lea esi, [esp + 0x34]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x14]
jmp 0x404a1c
lea esi, [esp + 0x24]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
jmp 0x404a0a
xor eax, eax
cmp dword [ebp + 0x2c], 0
jne 0x404a4a
push edi
push eax
push dword [0x4d7b78]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push edi
lea ecx, [esp + 0x54]
mov dword [ebp + 0x2c], eax
push ecx
push eax
mov dword [ebp + 0x30], edi
mov dword [ebp + 0x34], eax
call fcn.00414ba0
add esp, 0xc
jmp 0x404a7d
mov eax, dword [ebp + 0x30]
add eax, edi
push eax
push dword [ebp + 0x2c]
push 8
push dword [0x4d7b78]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ecx, eax
lea eax, [esp + 0x50]
push edi
push eax
mov eax, dword [ebp + 0x30]
add eax, ecx
mov dword [ebp + 0x2c], ecx
push eax
call fcn.00414ba0
add esp, 0xc
add dword [ebp + 0x30], edi
mov eax, dword [esp + 0x20]
mov dword [eax], ebp
mov ecx, dword [ebx + 0x24]
mov dword [eax + 4], ecx
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x840
ret