joyce8/EMBER2024-capa huggingface dataset:
Function at 0x405cc8
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebx
mov ebx, esp
push ecx
push ecx
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x28
push esi
push edi
mov edi, edx
mov dword [ebp - 0x10], 1
mov esi, ecx
mov dword [ebp - 0xc], edi
xorps xmm0, xmm0
mov dword [ebp - 0x14], esi
movsd qword [ebp - 0x20], xmm0
jmp 0x405cfe
inc esi
movzx eax, byte [esi]
push eax
call fcn.004576e0
pop ecx
test eax, eax
jne 0x405cfd
mov al, byte [esi]
cmp al, 0x2d
jne 0x405d18
or dword [ebp - 0x10], 0xffffffff
jmp 0x405d1c
cmp al, 0x2b
jne 0x405d1f
inc esi
mov al, byte [esi]
movzx eax, al
jmp 0x405d4c
movsx eax, byte [esi]
movsd xmm1, qword [ebp - 0x20]
sub eax, 0x30
mulsd xmm1, qword [0x47db00]
inc esi
movd xmm0, eax
movzx eax, byte [esi]
cvtdq2pd xmm0, xmm0
addsd xmm1, xmm0
movsd qword [ebp - 0x20], xmm1
push eax
call fcn.00457650
pop ecx
test eax, eax
jne 0x405d24
mov al, byte [esi]
movsd xmm0, qword [0x47daf0]
movsd qword [ebp - 0x28], xmm0
cmp al, 0x2e
jne 0x405dc7
movsd qword [ebp - 8], xmm0
jmp 0x405da7
movsx eax, byte [esi]
movsd xmm1, qword [ebp - 0x20]
sub eax, 0x30
mulsd xmm1, qword [0x47db00]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
addsd xmm1, xmm0
movsd xmm0, qword [ebp - 8]
mulsd xmm0, qword [0x47db00]
movsd qword [ebp - 0x20], xmm1
movsd qword [ebp - 8], xmm0
inc esi
movzx eax, byte [esi]
push eax
call fcn.00457650
pop ecx
test eax, eax
jne 0x405d71
movsd xmm0, qword [ebp - 0x20]
divsd xmm0, qword [ebp - 8]
mov al, byte [esi]
movsd qword [ebp - 0x20], xmm0
cmp al, 0x65
je 0x405dd3
cmp al, 0x45
jne 0x405ebf
xor edi, edi
mov dword [ebp - 4], 1
inc esi
mov al, byte [esi]
cmp al, 0x2d
jne 0x405de9
or dword [ebp - 4], 0xffffffff
jmp 0x405ded
cmp al, 0x2b
jne 0x405df0
inc esi
mov al, byte [esi]
movzx eax, al
push eax
call fcn.00457650
pop ecx
test eax, eax
je 0x405e9e
imul ecx, edi, 0xa
movsx edi, byte [esi]
add ecx, 0xffffffd0
add edi, ecx
inc esi
movzx eax, byte [esi]
push eax
call fcn.00457650
pop ecx
test eax, eax
jne 0x405e02
movsd xmm0, qword [0x47daf0]
cmp edi, 0x40
jl 0x405e45
mov ecx, edi
shr ecx, 6
imul eax, ecx, 0xffffffc0
add edi, eax
mulsd xmm0, qword [0x47db70]
sub ecx, 1
jne 0x405e33
movsd qword [ebp - 0x28], xmm0
cmp edi, 0x10
jl 0x405e66
mov ecx, edi
shr ecx, 4
imul eax, ecx, 0xfffffff0
add edi, eax
mulsd xmm0, qword [0x47db58]
sub ecx, 1
jne 0x405e54
movsd qword [ebp - 0x28], xmm0
cmp edi, 4
jl 0x405e87
mov ecx, edi
shr ecx, 2
imul eax, ecx, 0xfffffffc
add edi, eax
mulsd xmm0, qword [0x47db28]
sub ecx, 1
jne 0x405e75
movsd qword [ebp - 0x28], xmm0
cmp edi, 1
jl 0x405e9e
mulsd xmm0, qword [0x47db00]
sub edi, 1
jne 0x405e8c
movsd qword [ebp - 0x28], xmm0
cmp dword [ebp - 4], 0
mov edi, dword [ebp - 0xc]
jge 0x405eb3
movsd xmm0, qword [ebp - 0x20]
divsd xmm0, qword [ebp - 0x28]
jmp 0x405ec4
movsd xmm0, qword [ebp - 0x28]
mulsd xmm0, qword [ebp - 0x20]
jmp 0x405ec4
movsd xmm0, qword [ebp - 0x20]
cmp dword [ebp - 0x10], 0
jge 0x405ed1
xorps xmm0, xmmword [0x47e130]
sub esi, dword [ebp - 0x14]
movsd qword [edi], xmm0
mov eax, esi
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
Function at 0x418030
Capabilities:
Enumerate pe sections

Disassembly:
push ebx
push esi
push edi
mov edi, edx
mov ebx, ecx
test edi, edi
je 0x4180fb
push 0x48
pop edx
call fcn.004040b0
mov esi, eax
test esi, esi
je 0x4180fb
mov cl, byte [edi + 5]
mov byte [esi + 5], cl
mov ecx, ebx
mov edx, dword [edi]
call fcn.00417dc6
mov dword [esi], eax
mov ecx, ebx
mov edx, dword [edi + 0xc]
call fcn.00417e9f
mov dword [esi + 0xc], eax
mov ecx, ebx
mov edx, dword [edi + 0x10]
call fcn.00417cef
mov dword [esi + 0x10], eax
mov ecx, ebx
mov edx, dword [edi + 0x14]
call fcn.00417dc6
mov dword [esi + 0x14], eax
mov ecx, ebx
mov edx, dword [edi + 0x18]
call fcn.00417cef
mov dword [esi + 0x18], eax
mov ecx, ebx
mov edx, dword [edi + 0x1c]
call fcn.00417dc6
mov dword [esi + 0x1c], eax
mov ecx, ebx
mov al, byte [edi + 4]
mov byte [esi + 4], al
mov edx, dword [edi + 0x20]
call fcn.00418030
mov dword [esi + 0x20], eax
mov ecx, ebx
mov edx, dword [edi + 0x2c]
call fcn.00417cef
mov dword [esi + 0x2c], eax
mov ecx, ebx
mov edx, dword [edi + 0x30]
call fcn.00417cef
or ecx, 0xffffffff
mov dword [esi + 0x30], eax
mov dword [esi + 0x34], ecx
mov dword [esi + 0x38], ecx
mov al, byte [edi + 6]
mov byte [esi + 6], al
mov al, byte [edi + 7]
mov byte [esi + 7], al
xor eax, eax
mov word [esi + 8], ax
mov dword [esi + 0x28], eax
mov eax, esi
mov dword [esi + 0x3c], ecx
mov dword [esi + 0x40], ecx
mov dword [esi + 0x44], ecx
jmp 0x4180fd
xor eax, eax
pop edi
pop esi
pop ebx
ret
Function at 0x42b61e
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, edx
push esi
push edi
mov esi, ecx
lea eax, [ebx - 1]
cmp eax, 7
jbe 0x42b63a
mov dword [esi + 0x6afa4], 0x478e64
xor edi, edi
mov dword [esi + 0x6af78], edi
cmp dword [esi + 0x6af70], edi
jne 0x42b65e
mov dword [esi + 0x6af78], 1
mov dword [esi + 0x6af70], 0x10000
push 0x1fffc
lea eax, [esi + 0x4af70]
mov dword [esi + 0x6af6c], edi
push edi
push eax
call fcn.00455b80
movzx eax, word [ebx*8 + 0x47d04a]
add esp, 0xc
mov dword [esi + 0x6af98], eax
movzx eax, word [ebx*8 + 0x47d048]
mov dword [esi + 0x6af9c], eax
movzx eax, word [ebx*8 + 0x47d04c]
push 2
mov dword [esi + 0x6afa0], eax
movzx eax, word [ebx*8 + 0x47d04e]
pop ecx
mov dword [esi + 0x6af94], eax
cmp ebx, ecx
jg 0x42b6c1
mov eax, dword [ebp + 8]
or word [eax], 4
jmp 0x42b6cc
cmp ebx, 8
jl 0x42b6cc
mov eax, dword [ebp + 8]
or word [eax], cx
mov eax, dword [esi + 0xc]
lea ebx, [esi + 0x1af70]
push 0x10000
push ebx
push esi
mov dword [esi + 0x6af84], edi
mov dword [esi + 0x6af74], edi
call eax
add esp, 0xc
mov dword [esi + 0x6af90], eax
test eax, eax
je 0x42b735
cmp eax, 0xffffffff
je 0x42b735
mov dword [esi + 0x6af8c], edi
cmp eax, 0x106
jae 0x42b710
mov ecx, esi
call fcn.0042b904
mov dword [esi + 0x6af7c], edi
mov ecx, edi
movzx eax, byte [ebx + edi]
shl ecx, 5
xor ecx, eax
and ecx, 0x7fff
inc edi
mov dword [esi + 0x6af7c], ecx
cmp edi, 2
jb 0x42b718
jmp 0x42b745
mov dword [esi + 0x6af8c], 1
mov dword [esi + 0x6af90], edi
pop edi
pop esi
pop ebx
pop ebp
ret
Function at 0x42ba4d
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
mov esi, ecx
xor ebx, ebx
mov ecx, ebx
push edi
mov dword [ebp - 4], ecx
mov edi, ebx
mov eax, dword [esi + 0x6af90]
mov dword [esi + 0x6af80], 2
jmp 0x42bc5f
cmp eax, 3
jb 0x42bacc
mov edx, dword [esi + 0x6af84]
mov eax, dword [esi + 0x6af7c]
shl eax, 5
movzx ecx, byte [edx + esi + 0x1af72]
xor ecx, eax
and ecx, 0x7fff
and edx, 0x7fff
mov dword [esi + 0x6af7c], ecx
mov eax, dword [esi + ecx*4 + 0x4af70]
mov dword [esi + edx*4 + 0x2af70], eax
mov ecx, dword [esi + 0x6af7c]
mov dword [ebp - 4], eax
mov eax, dword [esi + 0x6af84]
mov dword [esi + ecx*4 + 0x4af70], eax
mov ecx, dword [ebp - 4]
test ecx, ecx
je 0x42bb09
mov eax, dword [esi + 0x6af84]
sub eax, ecx
cmp eax, 0x7efa
ja 0x42bb09
mov eax, dword [esi + 0x6af90]
cmp dword [esi + 0x6afa0], eax
jbe 0x42baf3
mov dword [esi + 0x6afa0], eax
mov edx, ecx
mov ecx, esi
call fcn.0042b74a
mov ecx, dword [esi + 0x6af90]
mov edi, eax
cmp edi, ecx
cmova edi, ecx
mov ecx, dword [esi + 0x6af84]
cmp edi, 3
jb 0x42bbe9
sub ecx, dword [esi + 0x6af88]
lea eax, [edi - 3]
mov edx, ecx
mov ecx, esi
push eax
call fcn.0042b06a
pop ecx
mov ecx, dword [esi + 0x6af90]
sub ecx, edi
mov dword [ebp - 8], eax
mov dword [esi + 0x6af90], ecx
cmp edi, dword [esi + 0x6af98]
ja 0x42bbb3
cmp ecx, 3
jb 0x42bbb3
dec edi
inc dword [esi + 0x6af84]
mov edx, dword [esi + 0x6af84]
mov eax, dword [esi + 0x6af7c]
shl eax, 5
movzx ecx, byte [edx + esi + 0x1af72]
and edx, 0x7fff
xor ecx, eax
and ecx, 0x7fff
mov dword [esi + 0x6af7c], ecx
mov eax, dword [esi + ecx*4 + 0x4af70]
mov dword [esi + edx*4 + 0x2af70], eax
mov ecx, dword [esi + 0x6af7c]
mov dword [ebp - 4], eax
mov eax, dword [esi + 0x6af84]
mov dword [esi + ecx*4 + 0x4af70], eax
sub edi, 1
jne 0x42bb4b
inc dword [esi + 0x6af84]
mov edx, dword [esi + 0x6af84]
jmp 0x42bbe4
mov edx, dword [esi + 0x6af84]
add edx, edi
mov edi, ebx
mov dword [esi + 0x6af84], edx
movzx ecx, byte [edx + esi + 0x1af70]
mov dword [esi + 0x6af7c], ecx
movzx eax, byte [edx + esi + 0x1af71]
shl ecx, 5
xor eax, ecx
mov dword [esi + 0x6af7c], eax
mov eax, dword [ebp - 8]
jmp 0x42bc0e
movzx eax, byte [ecx + esi + 0x1af70]
xor edx, edx
push eax
mov ecx, esi
call fcn.0042b06a
dec dword [esi + 0x6af90]
inc dword [esi + 0x6af84]
mov edx, dword [esi + 0x6af84]
pop ecx
test eax, eax
je 0x42bc42
mov eax, dword [esi + 0x6af74]
sub edx, eax
test eax, eax
js 0x42bc27
add eax, 0x1af70
add eax, esi
jmp 0x42bc29
mov eax, ebx
push ebx
push edx
mov edx, eax
mov ecx, esi
call fcn.0042ae75
mov eax, dword [esi + 0x6af84]
pop ecx
pop ecx
mov dword [esi + 0x6af74], eax
mov eax, dword [esi + 0x6af90]
cmp eax, 0x106
jae 0x42bc5c
mov ecx, esi
call fcn.0042b904
mov eax, dword [esi + 0x6af90]
mov ecx, dword [ebp - 4]
test eax, eax
jne 0x42ba75
mov eax, dword [esi + 0x6af74]
mov ecx, dword [esi + 0x6af84]
sub ecx, eax
test eax, eax
js 0x42bc81
lea ebx, [esi + 0x1af70]
add ebx, eax
push 1
push ecx
mov edx, ebx
mov ecx, esi
call fcn.0042ae75
pop ecx
pop ecx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x42c87d
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
test edx, edx
jne 0x42c888
xor eax, eax
pop ebp
ret
push esi
mov esi, dword [ebp + 8]
not ecx
cmp esi, 8
jb 0x42c944
push edi
mov edi, esi
shr edi, 3
movzx eax, byte [edx]
sub esi, 8
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x47cb00]
movzx eax, byte [edx + 1]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x47cb00]
movzx eax, byte [edx + 2]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x47cb00]
movzx eax, byte [edx + 3]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x47cb00]
movzx eax, byte [edx + 4]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x47cb00]
movzx eax, byte [edx + 5]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x47cb00]
movzx eax, byte [edx + 6]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x47cb00]
movzx eax, byte [edx + 7]
add edx, 8
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x47cb00]
sub edi, 1
jne 0x42c89d
pop edi
test esi, esi
je 0x42c960
movzx eax, byte [edx]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x47cb00]
inc edx
sub esi, 1
jne 0x42c948
not ecx
mov eax, ecx
pop esi
pop ebp
ret

Function at 0x42c967
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
push esi
mov esi, ecx
movsx eax, dl
mov ecx, dword [esi]
xor eax, ecx
movzx eax, al
shr ecx, 8
xor ecx, dword [eax*4 + 0x47cb00]
movzx eax, cl
add eax, dword [esi + 4]
imul eax, eax, 0x8088405
mov dword [esi], ecx
mov ecx, dword [esi + 8]
inc eax
mov dword [esi + 4], eax
shr eax, 0x18
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x47cb00]
mov dword [esi + 8], ecx
pop esi
ret
Function at 0x42ce17
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
push edi
mov edi, dword [ebp + 0xc]
cmp byte [esi + 0x2d], 0
je 0x42ce8c
mov ecx, dword [esi + 0x3c]
mov eax, ecx
test ecx, ecx
je 0x42ce46
cmp dword [esi + 0x40], edi
jae 0x42ce46
push ecx
call fcn.00453367
and dword [esi + 0x3c], 0
pop ecx
jmp 0x42ce4a
test eax, eax
jne 0x42ce5a
lea eax, [edi + edi]
push eax
call fcn.00453919
pop ecx
mov dword [esi + 0x3c], eax
mov dword [esi + 0x40], edi
push edi
push ebx
push eax
call fcn.00455d50
add esp, 0xc
xor ebx, ebx
test edi, edi
je 0x42ce89
lea ecx, [esi + 0x30]
mov eax, dword [esi + 0x3c]
mov dl, byte [ebx + eax]
call fcn.0042c9aa
mov cl, al
mov eax, dword [esi + 0x3c]
mov byte [ebx + eax], cl
inc ebx
lea ecx, [esi + 0x30]
cmp ebx, edi
jb 0x42ce6e
mov ebx, dword [esi + 0x3c]
mov ecx, dword [esi + 0x20]
test ecx, ecx
je 0x42cebb
mov edx, dword [esi + 0x24]
lea eax, [edx + edi]
cmp eax, dword [esi + 0x28]
jb 0x42cea7
mov dword [esi + 0x14], 0x30000
jmp 0x42cedd
push edi
add ecx, edx
push ebx
push ecx
call fcn.00455d50
add esp, 0xc
mov eax, edi
add dword [esi + 0x24], edi
jmp 0x42cedf
mov eax, dword [esi + 4]
test eax, eax
je 0x42ced6
push 0
lea ecx, [ebp + 8]
push ecx
push edi
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp + 8]
jmp 0x42cedf
mov dword [esi + 0x14], 0x1000000
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret 8

Function at 0x42d29c
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
mov edi, ecx
mov ecx, dword [edi + 0x84]
test ecx, ecx
je 0x42d2f2
mov eax, dword [edi + 0x8c]
mov esi, dword [edi + 0x88]
cmp eax, esi
jae 0x42d32d
sub esi, eax
cmp esi, dword [ebp + 0xc]
cmova esi, dword [ebp + 0xc]
add eax, ecx
push esi
push eax
push dword [ebp + 8]
call fcn.00455d50
mov edx, dword [ebp + 8]
mov ecx, dword [edi + 0x78]
add dword [edi + 0x8c], esi
add dword [edi + 0x74], esi
push esi
call fcn.0042c87d
add esp, 0x10
mov dword [edi + 0x78], eax
mov eax, esi
jmp 0x42d32f
cmp dword [edi + 0x7c], 0
je 0x42d326
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [edi + 0x7c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x42d32d
mov esi, dword [ebp - 4]
mov edx, dword [ebp + 8]
mov ecx, dword [edi + 0x78]
add dword [edi + 0x74], esi
push esi
call fcn.0042c87d
pop ecx
jmp 0x42d2eb
mov dword [edi + 0x14], 0x1000000
xor eax, eax
pop edi
pop esi
leave
ret 8
Function at 0x42efd9
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
mov esi, ecx
push 0xffffffffffffffff
push 0
mov eax, dword [esi + 8]
mov dword [ebp - 8], eax
mov eax, dword [esi + 4]
mov dword [ebp - 4], eax
lea eax, [ebp - 8]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov ecx, 0x4874b0
lock xadd dword [ecx], eax
mov ecx, dword [esi + 4]
push 0
push ecx
test eax, eax
je 0x42f023
call dword [sym.imp.KERNEL32.dll_TerminateThread]
jmp 0x42f039
push method.asio::execution_context::service.virtual_8
call dword [sym.imp.KERNEL32.dll_QueueUserAPC]
push 0xffffffffffffffff
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
pop esi
leave
ret

Function at 0x42f03c
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push ebx
push esi
push edi
xor eax, eax
mov esi, ecx
push eax
push eax
push 1
push eax
mov dword [esp + 0x20], esi
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov ebx, dword [ebp + 8]
mov edi, eax
mov dword [ebx + 4], edi
test edi, edi
jne 0x42f090
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebx]
mov ecx, ebx
push 1
mov esi, eax
call dword [edx]
mov dword [esp + 0x18], esi
call fcn.0042e8d6
mov dword [esp + 0x1c], eax
test esi, esi
jne 0x42f167
mov esi, dword [esp + 0x10]
xor eax, eax
push eax
push eax
push 1
push eax
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [esi + 8], eax
xor ecx, ecx
mov dword [ebx + 8], eax
cmp dword [esi + 8], ecx
jne 0x42f0df
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebx]
mov ecx, ebx
push 1
mov esi, eax
call dword [edx]
mov dword [esp + 0x18], esi
call fcn.0042e8d6
mov dword [esp + 0x1c], eax
test esi, esi
je 0x42f0d9
mov edx, str.thread.exit_event
lea ecx, [esp + 0x18]
jmp 0x42f170
mov esi, dword [esp + 0x10]
xor ecx, ecx
lea eax, [esp + 0x14]
mov dword [esp + 0x14], ecx
push eax
push ecx
push ebx
push 0x42f176
push ecx
push ecx
call fcn.00459a4d
add esp, 0x18
mov dword [esi + 4], eax
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x42f14e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebx]
mov ecx, ebx
push 1
mov dword [esp + 0x1c], eax
call dword [edx]
test edi, edi
je 0x42f11f
push edi
call esi
mov eax, dword [esp + 0x10]
cmp dword [eax + 8], 0
je 0x42f12e
push dword [eax + 8]
call esi
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x18], ebx
call fcn.0042e8d6
mov dword [esp + 0x1c], eax
test ebx, ebx
je 0x42f14e
mov edx, str.thread
lea ecx, [esp + 0x18]
jmp 0x42f170
test edi, edi
je 0x42f15e
push 0xffffffffffffffff
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push edi
call esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov edx, str.thread.entry_event
lea ecx, [esp + 0x18]
call fcn.0042e86c
int3
Function at 0x42f1c2
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x198
mov eax, dword [0x48500c]
xor eax, esp
mov dword [esp + 0x194], eax
xor eax, eax
inc eax
lock xadd dword [0x4874b4], eax
inc eax
cmp eax, 1
jne 0x42f200
lea eax, [esp]
push eax
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov ecx, 0x4874b8
xchg dword [ecx], eax
mov ecx, dword [esp + 0x194]
xor ecx, esp
call fcn.00453154
mov esp, ebp
pop ebp
ret

Function at 0x42f7f3
Capabilities:
Get thread local storage value

Disassembly:
push esi
push dword [0x487520]
mov esi, ecx
lea eax, [esi + 0x14]
neg esi
sbb esi, esi
and esi, eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
jmp 0x42f814
cmp dword [eax], esi
je 0x42f81a
mov eax, dword [eax + 8]
test eax, eax
jne 0x42f80d
pop esi
ret
mov ecx, dword [eax + 4]
test ecx, ecx
je 0x42f818
pop esi
jmp fcn.0042ea7e

Function at 0x42fc13
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
mov ebx, ecx
mov dword [ebp - 8], edx
xor esi, esi
push edi
cmp ebx, 0xffffffff
je 0x42fcea
cmp byte [ebp + 8], 0
je 0x42fc6f
mov al, byte [edx]
test al, 8
je 0x42fc6f
or al, 8
mov dword [ebp - 0xc], 0x485b38
push 4
mov byte [edx], al
xor ecx, ecx
and dword [ebp - 0x10], ecx
lea eax, [ebp - 4]
push eax
push 0x80
push 0xffff
push ebx
mov dword [ebp - 4], ecx
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
lea ecx, [ebp - 0x10]
setne dl
call fcn.0042fbf1
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
mov edi, dword [ebp + 0xc]
mov esi, eax
test esi, esi
mov ecx, edi
setne dl
call fcn.0042fbf1
test esi, esi
je 0x42fcea
call fcn.0042e8d6
mov ecx, dword [edi + 4]
mov ecx, dword [ecx + 4]
cmp ecx, dword [eax + 4]
jne 0x42fca3
cmp dword [edi], 0x2733
je 0x42fcbb
call fcn.0042e8d6
mov ecx, dword [edi + 4]
mov ecx, dword [ecx + 4]
cmp ecx, dword [eax + 4]
jne 0x42fcea
cmp dword [edi], 0x4d5
jne 0x42fcea
and dword [ebp - 4], 0
lea eax, [ebp - 4]
push eax
push 0x8004667e
push ebx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov eax, dword [ebp - 8]
push ebx
and byte [eax], 0xfc
call dword [sym.imp.WS2_32.dll_closesocket]
mov esi, eax
mov ecx, edi
test esi, esi
setne dl
call fcn.0042fbf1
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x42fcf1
Capabilities:
Connect socket
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
mov eax, dword [0x48500c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov ebx, ecx
mov esi, 0x2719
push edi
mov edi, dword [ebp + 0xc]
cmp ebx, 0xffffffff
jne 0x42fd22
call fcn.0042e8d6
mov dword [edi], esi
mov dword [edi + 4], eax
jmp 0x42fd39
push dword [ebp + 8]
push edx
push ebx
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
mov ecx, edi
setne dl
call fcn.0042fbf1
call fcn.0042e8d6
mov ecx, dword [edi + 4]
mov ecx, dword [ecx + 4]
cmp ecx, dword [eax + 4]
jne 0x42fd51
cmp dword [edi], 0x2734
je 0x42fd71
call fcn.0042e8d6
mov ecx, dword [edi + 4]
mov ecx, dword [ecx + 4]
cmp ecx, dword [eax + 4]
jne 0x42fe1e
cmp dword [edi], 0x2733
jne 0x42fe1e
cmp ebx, 0xffffffff
jne 0x42fd82
call fcn.0042e8d6
mov dword [edi], esi
jmp 0x42fe1b
xor eax, eax
mov dword [ebp - 0x208], ebx
inc eax
mov dword [ebp - 0x104], ebx
mov dword [ebp - 0x20c], eax
mov dword [ebp - 0x108], eax
lea eax, [ebp - 0x108]
push 0
push eax
lea eax, [ebp - 0x20c]
push eax
push 0
lea eax, [ebx + 1]
push eax
call dword [sym.imp.WS2_32.dll_select]
mov esi, eax
mov ecx, edi
test esi, esi
sets dl
call fcn.0042fbf1
test esi, esi
js 0x42fe1e
and dword [ebp - 0x210], 0
lea eax, [ebp - 0x214]
push eax
lea eax, [ebp - 0x210]
mov dword [ebp - 0x214], 4
push eax
push 0x1007
push 0xffff
push ebx
call dword [sym.imp.WS2_32.dll_getsockopt]
mov esi, eax
mov ecx, edi
test esi, esi
setne dl
call fcn.0042fbf1
cmp esi, 0xffffffff
je 0x42fe1e
call fcn.0042e8d6
mov ecx, dword [ebp - 0x210]
mov dword [edi], ecx
mov dword [edi + 4], eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00453154
leave
ret
Function at 0x42fe9d
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x110
mov eax, dword [0x48500c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, ecx
mov dword [ebp - 0x10c], eax
mov dword [ebp - 0x110], esi
mov bl, dl
push edi
mov edi, dword [ebp + 0x18]
cmp esi, 0xffffffff
jne 0x42feed
call fcn.0042e8d6
mov dword [edi], 0x2719
mov dword [edi + 4], eax
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00453154
leave
ret
cmp byte [ebp + 0x14], 0
je 0x42fefd
test bl, 0x10
je 0x42fefd
and dword [edi], 0
jmp 0x42fedc
push edi
push ecx
push dword [ebp + 0xc]
mov edx, eax
call fcn.0042fe2d
add esp, 0xc
test eax, eax
jns 0x42fede
and bl, 1
test bl, bl
jne 0x42fedc
call fcn.0042e8d6
mov ecx, dword [edi + 4]
mov ecx, dword [ecx + 4]
cmp ecx, dword [eax + 4]
jne 0x42ff2f
cmp dword [edi], 0x2733
je 0x42ff47
call fcn.0042e8d6
mov ecx, dword [edi + 4]
mov ecx, dword [ecx + 4]
cmp ecx, dword [eax + 4]
jne 0x42fedc
cmp dword [edi], 0x4d5
jne 0x42fedc
xor ecx, ecx
mov dword [ebp - 0x104], esi
push ecx
push ecx
lea eax, [ebp - 0x108]
mov dword [ebp - 0x108], 1
push eax
push ecx
lea eax, [esi + 1]
push eax
call dword [sym.imp.WS2_32.dll_select]
mov esi, eax
mov ecx, edi
test esi, esi
sets dl
call fcn.0042fbf1
test esi, esi
js 0x42fedc
mov esi, dword [ebp - 0x110]
mov edx, dword [ebp - 0x10c]
push edi
push ecx
push dword [ebp + 0xc]
mov ecx, esi
call fcn.0042fe2d
add esp, 0xc
test eax, eax
js 0x42ff13
jmp 0x42fede