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

Disassembly:
mov ecx, dword [esp + 4]
mov eax, dword [esp + 8]
lea edx, [ecx + eax]
mov eax, 0x1505
cmp ecx, edx
jae 0x464a37
push esi
mov esi, eax
shl esi, 5
add eax, esi
movsx esi, byte [ecx]
xor eax, esi
inc ecx
cmp ecx, edx
jb 0x464a25
pop esi
ret
Function at 0x467340
Capabilities:
Terminate thread

Disassembly:
push ebx
push esi
push edi
mov edi, dword [esp + 0x10]
mov eax, dword [edi]
mov esi, dword [edi + 0x427c]
mov dword [esp + 0x10], eax
mov ebx, dword [eax + 0x1c0]
test ebx, ebx
jne 0x46736e
mov eax, dword [eax + 0x1bc]
test eax, eax
mov ebx, eax
jne 0x46736e
mov ebx, 0x12c
push ebp
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov eax, dword [esi + 0x14]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [esi + 0x10]
mov ebp, eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov edx, dword [esi + 0x10]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call ebx
mov eax, dword [esi + 0x14]
mov dword [esi + 0x10], 0
push eax
call ebx
test ebp, ebp
mov dword [esi + 0x14], 0
mov bl, 1
jne 0x4673d1
mov ecx, dword [esi]
push 0x1388
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x467429
mov edx, dword [esi]
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_TerminateThread]
lea ebp, [esi + 8]
mov byte [edi + 0x4274], bl
mov dword [ebp], 0xffffffff
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4673f1
mov edx, dword [edi + 0x4270]
mov dword [eax], edx
mov eax, dword [edi + 0x4270]
xor esi, esi
test eax, eax
jne 0x4674d3
mov ebp, dword [ebp]
cmp ebp, 0x1b
jne 0x467445
push ebp
mov esi, ebp
call fcn.00466100
push eax
mov eax, dword [esp + 0x1c]
push str.Could_not_resolve_host:__s
push eax
call fcn.0045b7b0
add esp, 0x10
jmp 0x4674d3
mov eax, dword [edi + 0x4278]
push eax
call dword [sym.imp.WSOCK32.dll_WSASetLastError]
mov ecx, dword [esi]
lea ebp, [esi + 8]
push ebp
push ecx
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
jmp 0x4673e1
mov al, byte [edi + 0x4274]
test al, al
je 0x4674a7
mov al, byte [edi + 0xc0]
mov ecx, dword [edi + 0x4278]
test al, al
push ecx
push edi
je 0x467484
call fcn.00466420
mov edx, dword [edi + 0x4c]
push eax
mov eax, dword [esp + 0x20]
push edx
push str.Could_not_resolve_proxy:__s___s
push eax
call fcn.0045b7b0
add esp, 0x18
mov esi, 5
jmp 0x4674d3
call fcn.00466420
mov edx, dword [edi + 0x38]
push eax
mov eax, dword [esp + 0x20]
push edx
push str.Could_not_resolve_host:__s___s
push eax
call fcn.0045b7b0
add esp, 0x18
mov esi, 6
jmp 0x4674d3
cmp ebp, 0xffffffff
je 0x4674b8
cmp dword [edi + 0x4278], 0x2afc
jne 0x4674ce
mov ecx, dword [edi + 0x38]
mov edx, dword [esp + 0x14]
push ecx
push str.Resolving_host_timed_out:__s
push edx
call fcn.0045b7b0
add esp, 0xc
mov esi, 0x1c
lea eax, [edi + 0x4268]
push eax
call fcn.00467260
mov eax, dword [edi + 0x4270]
add esp, 4
test eax, eax
pop ebp
jne 0x4674f3
mov byte [edi + 0xbc], bl
mov eax, esi
pop edi
pop esi
pop ebx
ret
Function at 0x467580
Capabilities:
Resolve dns
Set socket configuration

Disassembly:
mov eax, dword [esp + 0x10]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x14]
push edi
mov edi, dword [esp + 0x14]
push esi
mov ebx, dword [edi]
mov dword [eax], 0
call dword [sym.imp.WSOCK32.dll_inet_addr]
cmp eax, 0xffffffff
je 0x4675b8
mov ecx, dword [esp + 0x1c]
push ecx
push esi
push eax
call fcn.0045e0a0
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
ret
mov ebp, dword [esp + 0x1c]
push 0
push ebp
push esi
push edi
call fcn.00467640
add esp, 0x10
test al, al
je 0x4675de
mov edx, dword [esp + 0x20]
pop edi
pop esi
pop ebp
mov dword [edx], 1
xor eax, eax
pop ebx
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
call fcn.00466420
push eax
push esi
push str.init_resolve_thread___failed_for__s___s_n
push ebx
call fcn.0045b740
add esp, 0x18
push esi
call dword [sym.imp.WSOCK32.dll_gethostbyname]
test eax, eax
jne 0x46762b
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
push eax
push edi
call fcn.00466420
push eax
push ebp
push esi
push str.gethostbyname_2__failed_for__s:_d___s_n
push ebx
call fcn.0045b740
add esp, 0x1c
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
push ebp
push eax
call fcn.00467a60
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x467640
Capabilities:
Create thread

Disassembly:
sub esp, 8
push ebx
push ebp
push esi
push edi
push 1
push 0x24
call dword [0x4b7924]
mov esi, eax
xor ebx, ebx
add esp, 8
cmp esi, ebx
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], ebx
jne 0x467676
push 0xc
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 8
ret
mov edi, dword [esp + 0x1c]
mov eax, dword [edi + 0x4268]
lea ebp, [edi + 0x4268]
push eax
mov dword [esp + 0x20], ebp
call fcn.0045e110
mov ecx, dword [esp + 0x24]
push ecx
call dword [0x4b7920]
add esp, 8
cmp eax, ebx
mov dword [ebp], eax
jne 0x4676c1
push esi
call dword [0x4b7918]
add esp, 4
push 0xc
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 8
ret
mov edx, dword [esp + 0x24]
push ebx
push 1
mov dword [edi + 0x426c], edx
mov byte [edi + 0x4274], bl
mov dword [edi + 0x4278], ebx
mov dword [edi + 0x4270], ebx
mov dword [edi + 0x427c], esi
push ebx
mov dword [esi + 0xc], 0xffffffff
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
cmp eax, ebx
mov dword [esi + 0x10], eax
jne 0x4676fe
push ebp
jmp 0x467751
mov ebp, dword [sym.imp.KERNEL32.dll_CreateEventA]
push ebx
push ebx
push 1
push ebx
call ebp
cmp eax, ebx
mov dword [esi + 0x14], eax
je 0x46774c
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
cmp eax, ebx
mov dword [esi + 0x1c], eax
jne 0x467729
mov ecx, dword [esp + 0x1c]
push ecx
jmp 0x467751
push ebx
push ebx
push 1
push ebx
call ebp
cmp eax, ebx
mov dword [esi + 0x20], eax
jne 0x46773e
mov edx, dword [esp + 0x1c]
push edx
jmp 0x467751
push ebx
push ebx
push 1
push ebx
call ebp
cmp eax, ebx
mov dword [esi + 0x18], eax
jne 0x46776b
mov eax, dword [esp + 0x1c]
push eax
call fcn.00467260
add esp, 4
push 0xb
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 8
ret
lea ecx, [esi + 4]
push ecx
push ebx
push edi
push 0x4677e0
push ebx
push ebx
call fcn.0042d76b
add esp, 0x18
cmp eax, ebx
mov dword [esi], eax
jne 0x4677ab
call fcn.0042e2a2
mov edx, dword [eax]
push edx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [esp + 0x1c]
push eax
call fcn.00467260
add esp, 4
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
push 0xffffffffffffffff
lea edx, [esp + 0x14]
mov dword [esp + 0x14], eax
mov ecx, dword [esi + 0x18]
push ebx
push edx
push 2
mov dword [esp + 0x24], ecx
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
push ebx
push 2
push 2
call dword [sym.imp.WSOCK32.dll_socket]
mov dword [esi + 0xc], eax
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 8
ret
Function at 0x46dff0
Capabilities:
Send data
Send data on socket

Disassembly:
push ecx
push ebx
push ebp
push esi
mov esi, dword [esp + 0x14]
mov dword [esp + 0xc], str.octet
mov eax, dword [esi + 0xc]
mov ebx, dword [eax]
mov al, byte [ebx + 0x2bf]
test al, al
je 0x46e017
mov dword [esp + 0xc], str.netascii
mov eax, dword [esp + 0x18]
cmp eax, 6
ja case.0x46e024.1
jmp dword [eax*4 + 0x46e1d4]
mov edx, dword [esi + 0x14]
mov ecx, dword [esi + 0x1c]
inc edx
mov eax, edx
mov dword [esi + 0x14], edx
cmp eax, ecx
jle 0x46e04f
mov dword [esi + 8], 9
mov dword [esi], 3
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
mov al, byte [ebx + 0x2cd]
test al, al
lea eax, [esi + 0x348]
je 0x46e09d
push 2
push eax
call fcn.0046e1f0
mov edx, dword [esi + 0xc]
lea ecx, [esi + 0x34c]
add esp, 8
mov eax, dword [edx]
mov dword [eax + 0xdc], ecx
mov eax, dword [ebx + 0x1c8]
mov ecx, dword [ebx + 0x1cc]
mov edx, eax
and edx, ecx
cmp edx, 0xffffffff
je 0x46e0a8
push ecx
push eax
push ebx
call fcn.004688b0
add esp, 0xc
jmp 0x46e0a8
push 1
push eax
call fcn.0046e1f0
add esp, 8
mov eax, dword [esi + 0xc]
push 0
push 0
mov ecx, dword [eax]
mov edx, dword [ecx + 0x1c]
inc edx
push edx
push ebx
call fcn.00473580
mov ebp, eax
add esp, 0x10
test ebp, ebp
jne 0x46e0cf
pop esi
pop ebp
mov eax, 0x1b
pop ebx
pop ecx
ret
mov eax, dword [esp + 0xc]
push edi
push 0
push eax
push 0
push ebp
push str._s_c_s_c
lea ecx, [esi + 0x34a]
push 0x200
push ecx
call fcn.0045b420
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
add esp, 0x1c
repne scasb al, byte es:[edi]
mov edi, dword [esp + 0x10]
not ecx
dec ecx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov eax, dword [esi + 0xc]
not ecx
mov eax, dword [eax + 0x14]
dec ecx
lea ecx, [edx + ecx + 4]
mov edx, dword [eax + 0x10]
mov eax, dword [eax + 0x18]
push edx
push eax
push 0
push ecx
mov ecx, dword [esi + 0x10]
lea eax, [esi + 0x348]
push eax
push ecx
call dword [sym.imp.WSOCK32.dll_sendto]
test eax, eax
pop edi
jge 0x46e157
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov edx, dword [esi + 0xc]
push eax
push edx
call fcn.00466420
push eax
push 0x4b8b28
push ebx
call fcn.0045b7b0
add esp, 0x14
push ebp
call fcn.0045e110
add esp, 4
xor eax, eax
pop esi
pop ebp
pop ebx
pop ecx
ret
push str.Connected_for_transmit
push 0x4b8b28
push ebx
call fcn.0045b740
push esi
mov dword [esi], 2
call fcn.0046d9f0
push 4
push esi
call fcn.0046e400
add esp, 0x18
pop esi
pop ebp
pop ebx
pop ecx
ret
push str.Connected_for_receive
push 0x4b8b28
push ebx
call fcn.0045b740
push esi
mov dword [esi], 1
call fcn.0046d9f0
push 3
push esi
call fcn.0046e210
add esp, 0x18
pop esi
pop ebp
pop ebx
pop ecx
ret
push str.tftp_send_first:_internal_error_n
push ebx
call fcn.0045b7b0
add esp, 8
xor eax, eax
pop esi
pop ebp
pop ebx
pop ecx
ret
Function at 0x46e210
Capabilities:
Send data
Send data on socket

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0xc]
push edi
mov eax, dword [esi + 0xc]
mov ebx, dword [eax]
mov eax, dword [esp + 0x14]
sub eax, 3
je 0x46e2cc
sub eax, 2
je 0x46e272
dec eax
je 0x46e249
push str.tftp_rx:_internal_error
push 0x4b8b28
push ebx
call fcn.0045b7b0
add esp, 0xc
jmp 0x46e3ac
mov edx, dword [esi + 0x14]
inc edx
mov eax, edx
mov dword [esi + 0x14], edx
push eax
push str.Timeout_waiting_for_block__d_ACK.__Retries___d_n
push ebx
call fcn.0045b740
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x1c]
add esp, 0xc
cmp ecx, eax
jle 0x46e27d
mov dword [esi + 8], 8
mov dword [esi], 3
jmp 0x46e3ac
mov edx, dword [esi + 0x138]
lea eax, [esi + 0xb8]
push edx
mov edx, dword [esi + 0x10]
push eax
push 0
lea ecx, [esi + 0x348]
push 4
push ecx
push edx
call dword [sym.imp.WSOCK32.dll_sendto]
test eax, eax
jge 0x46e3ac
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
push eax
mov eax, dword [esi + 0xc]
push eax
call fcn.00466420
push eax
push 0x4b8b28
push ebx
call fcn.0045b7b0
add esp, 0x14
jmp 0x46e3ac
lea ecx, [esi + 0x144]
push ecx
call fcn.0046df50
xor edx, edx
mov di, ax
mov dx, word [esi + 0x28]
add esp, 4
and edi, 0xffff
inc edx
cmp edx, edi
je 0x46e32d
push edi
push str.Received_unexpected_DATA_packet_block__d_n
push ebx
call fcn.0045b740
mov edx, dword [esi + 0x14]
mov ecx, dword [esi + 0x1c]
add esp, 0xc
inc edx
mov eax, edx
mov dword [esi + 0x14], edx
cmp eax, ecx
jle 0x46e32d
xor eax, eax
mov ax, word [esi + 0x28]
inc eax
push eax
push str.tftp_rx:_giving_up_waiting_for_block__d_n
push ebx
call fcn.0045b7b0
add esp, 0xc
mov eax, 0x47
pop edi
pop esi
pop ebx
ret
mov word [esi + 0x28], di
lea edi, [esi + 0x348]
push 4
push edi
mov dword [esi + 0x14], 0
call fcn.0046e1f0
mov cx, word [esi + 0x28]
push ecx
push edi
call fcn.0046e3e0
mov edx, dword [esi + 0x138]
mov ecx, dword [esi + 0x10]
add esp, 0x10
lea eax, [esi + 0xb8]
push edx
push eax
push 0
push 4
push edi
push ecx
call dword [sym.imp.WSOCK32.dll_sendto]
test eax, eax
jge 0x46e394
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov edx, dword [esi + 0xc]
push eax
push edx
call fcn.00466420
push eax
push 0x4b8b28
push ebx
call fcn.0045b7b0
add esp, 0x14
mov ecx, dword [esi + 0x13c]
xor eax, eax
cmp ecx, 0x204
setge al
dec eax
and eax, 2
inc eax
mov dword [esi], eax
xor eax, eax
push 0
mov ax, word [esi + 0x28]
push 0x200
cdq
push edx
push eax
call fcn.0042ba40
push edx
push eax
push ebx
call fcn.00468830
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
ret
Function at 0x46e400
Capabilities:
Send data
Send data on socket

Disassembly:
push ebx
push ebp
push esi
mov esi, dword [esp + 0x10]
push edi
xor edi, edi
mov eax, dword [esi + 0xc]
mov ebp, dword [eax]
mov eax, dword [esp + 0x18]
sub eax, 4
je 0x46e4a5
dec eax
je 0x46e463
dec eax
je 0x46e43a
push str.tftp_tx:_internal_error
push 0x4b8b28
push ebp
call fcn.0045b7b0
add esp, 0xc
jmp 0x46e60b
mov edx, dword [esi + 0x14]
inc edx
mov eax, edx
mov dword [esi + 0x14], edx
push eax
push str.Timeout_waiting_for_block__d_ACK.__Retries___d_n
push ebp
call fcn.0045b740
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x1c]
add esp, 0xc
cmp ecx, eax
jle 0x46e46e
mov dword [esi + 8], 8
mov dword [esi], 3
jmp 0x46e60b
mov edx, dword [esi + 0x138]
mov ecx, dword [esi + 0x140]
lea eax, [esi + 0xb8]
push edx
push eax
mov eax, dword [esi + 0x10]
add ecx, 4
push edi
lea edx, [esi + 0x348]
push ecx
push edx
push eax
call dword [sym.imp.WSOCK32.dll_sendto]
test eax, eax
jge 0x46e60b
jmp 0x46e5ec
lea edx, [esi + 0x144]
push edx
call fcn.0046df50
mov dx, word [esi + 0x28]
and eax, 0xffff
mov ecx, edx
add esp, 4
and ecx, 0xffff
cmp eax, ecx
je 0x46e567
push ecx
push eax
push str.Received_ACK_for_block__d__expecting__d_n
push ebp
call fcn.0045b740
mov edx, dword [esi + 0x14]
mov ecx, dword [esi + 0x1c]
add esp, 0x10
inc edx
mov eax, edx
mov dword [esi + 0x14], edx
cmp eax, ecx
jle 0x46e50e
xor eax, eax
mov ax, word [esi + 0x28]
push eax
push str.tftp_tx:_giving_up_waiting_for_block__d_ack
push ebp
call fcn.0045b7b0
add esp, 0xc
mov edi, 0x37
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, dword [esi + 0x138]
mov eax, dword [esi + 0x140]
lea edx, [esi + 0xb8]
push ecx
push edx
mov edx, dword [esi + 0x10]
add eax, 4
push edi
lea ecx, [esi + 0x348]
push eax
push ecx
push edx
call dword [sym.imp.WSOCK32.dll_sendto]
test eax, eax
jge 0x46e560
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
push eax
mov eax, dword [esi + 0xc]
push eax
call fcn.00466420
push eax
push 0x4b8b28
push ebp
call fcn.0045b7b0
add esp, 0x14
mov edi, 0x37
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret
mov dword [esi + 0x14], edi
lea edi, [esi + 0x348]
inc edx
push 3
push edi
mov word [esi + 0x28], dx
call fcn.0046e1f0
mov cx, word [esi + 0x28]
push ecx
push edi
call fcn.0046e3e0
add esp, 0x10
cmp word [esi + 0x28], 1
jbe 0x46e5ab
cmp dword [esi + 0x140], 0x200
jge 0x46e5ab
mov dword [esi], 3
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
mov edx, dword [esi + 0xc]
lea ebx, [esi + 0x140]
push ebx
push 0x200
push edx
call fcn.00462090
add esp, 0xc
test eax, eax
jne 0x46e62d
mov eax, dword [esi + 0x138]
mov edx, dword [ebx]
lea ecx, [esi + 0xb8]
push eax
mov eax, dword [esi + 0x10]
push ecx
add edx, 4
push 0
push edx
push edi
push eax
call dword [sym.imp.WSOCK32.dll_sendto]
test eax, eax
jge 0x46e60b
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov ecx, dword [esi + 0xc]
push eax
push ecx
call fcn.00466420
push eax
push 0x4b8b28
push ebp
call fcn.0045b7b0
add esp, 0x14
xor eax, eax
push 0
mov ax, word [esi + 0x28]
push 0x200
cdq
push edx
push eax
call fcn.0042ba40
push edx
push eax
push ebp
call fcn.00468850
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x46fba0
Capabilities:
Send data
Send data on socket

Disassembly:
mov al, byte [esp + 0xc]
push ebx
mov ebx, dword [esp + 0xc]
push esi
mov esi, dword [esp + 0xc]
push edi
push 0
lea ecx, [esp + 0x14]
mov edx, dword [esi + 0x7c]
mov edi, dword [esi]
push 3
push ecx
push edx
mov byte [esp + 0x20], 0xff
mov byte [esp + 0x21], bl
mov byte [esp + 0x22], al
call dword [sym.imp.WSOCK32.dll_send]
test eax, eax
jge 0x46fbea
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push edi
call fcn.0045b7b0
add esp, 0xc
mov eax, dword [esp + 0x18]
mov ecx, dword [esi]
push eax
push ebx
push str.SENT
push ecx
call fcn.0046fc10
add esp, 0x10
pop edi
pop esi
pop ebx
ret
Function at 0x474a30
Capabilities:
Set socket configuration

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push esi
xor eax, eax
mov esi, dword [ebx]
push edi
push 0x4bc2d0
mov edi, 6
mov al, byte [esi + 0x2ee]
mov dword [esp + 0x14], eax
call dword [sym.imp.WSOCK32.dll_getprotobyname]
test eax, eax
je 0x474a5d
movsx edi, word [eax + 8]
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x10]
push 4
push ecx
push 1
push edi
push edx
call dword [sym.imp.WSOCK32.dll_setsockopt]
test eax, eax
jge 0x474a96
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
push eax
push ebx
call fcn.00466420
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.0045b740
add esp, 0x14
pop edi
pop esi
pop ebx
ret
push str.TCP_NODELAY_set_n
push esi
call fcn.0045b740
add esp, 8
pop edi
pop esi
pop ebx
ret

Function at 0x476b90
Capabilities:
Create tcp socket
Create udp socket
Initialize winsock library
Set socket configuration

Disassembly:
sub esp, 0x1a8
push esi
lea eax, [esp + 0x1c]
push edi
push eax
push 0x202
mov dword [esp + 0x10], 0
call dword [sym.imp.WSOCK32.dll_WSAStartup]
mov edi, dword [esp + 0x1b4]
mov dword [esp + 0xc], 0x10
push edi
mov word [esp + 0x14], 2
call dword [sym.imp.WSOCK32.dll_htons]
push 0
mov word [esp + 0x16], ax
call dword [sym.imp.WSOCK32.dll_htonl]
push 6
push 1
push 2
mov dword [esp + 0x20], eax
call dword [sym.imp.WSOCK32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
je 0x476c43
push esi
call fcn.00478c80
add esp, 4
test eax, eax
jne 0x476c3c
lea ecx, [esp + 8]
push 4
push ecx
push 4
push 0xffff
push esi
call dword [sym.imp.WSOCK32.dll_setsockopt]
test eax, eax
jne 0x476c3c
mov edx, dword [esp + 0xc]
lea eax, [esp + 0x10]
push edx
push eax
push esi
call dword [sym.imp.WSOCK32.dll_bind]
test eax, eax
jl 0x476c3c
push 0x80
push esi
call dword [sym.imp.WSOCK32.dll_listen]
test eax, eax
je 0x476c72
push esi
call dword [sym.imp.WSOCK32.dll_closesocket]
call fcn.0042e2a2
mov ecx, dword [eax]
push ecx
call fcn.0047d905
add esp, 4
push eax
push edi
push str.open_listening_port__d_:__s
push 0
push 2
call fcn.004786e0
add esp, 0x14
or eax, 0xffffffff
pop edi
pop esi
add esp, 0x1a8
ret
mov eax, esi
pop edi
pop esi
add esp, 0x1a8
ret

Function at 0x476c80
Capabilities:
Get socket status

Disassembly:
mov eax, 0x1020
call fcn.0042b9a0
mov ecx, dword [esp + 0x1028]
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
push esi
shr eax, 0x1f
add edx, eax
mov eax, ecx
mov dword [esp + 4], edx
mov ecx, 0x3e8
cdq
idiv ecx
mov esi, dword [esp + 0x1028]
push edi
lea eax, [esp + 0x24]
or edi, 0xffffffff
lea ecx, [esi + 1]
mov dword [esp + 0x10], 0x10
mov dword [esp + 0x28], esi
mov dword [esp + 0x24], 1
mov dword [esp + 0xc], edx
lea edx, [esp + 8]
push edx
push 0
push 0
push eax
push ecx
call dword [sym.imp.WSOCK32.dll_select]
cmp eax, 1
jne 0x476d0b
lea edx, [esp + 0x10]
lea eax, [esp + 0x14]
push edx
push eax
push esi
call dword [sym.imp.WSOCK32.dll_accept]
pop edi
pop esi
add esp, 0x1020
ret
mov eax, edi
pop edi
pop esi
add esp, 0x1020
ret
Function at 0x47c9a0
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
push edi
mov esi, dword [ebp + 0x10]
push 0xf00021
mov edx, dword [esi + 4]
mov ecx, dword [esi]
mov eax, dword [esi + 0xc]
sub eax, edx
push eax
mov eax, dword [esi + 8]
sub eax, ecx
push eax
push edx
push ecx
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.GDI32.dll_PatBlt]
mov edi, dword [ebp + 8]
push edi
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
mov ebx, eax
lea eax, [eax + 5]
add eax, 3
and eax, 0xfffffffc
call fcn.0042b9a0
mov dword [ebp - 4], esp
cmp dword [ebp - 4], 0
je 0x47ca6b
add ebx, 2
mov eax, dword [ebp - 4]
push ebx
push eax
push edi
call dword [sym.imp.USER32.dll_GetWindowTextA]
test eax, eax
je 0x47ca6b
mov bx, 0x140
mov edi, dword [ebp + 0x14]
mov eax, edi
and al, 0xf
cmp al, 0xc
je 0x47ca1e
mov ebx, edi
and bx, 0xf
or bx, 0x150
test edi, 0x80
je 0x47ca29
or bh, 8
and edi, 0x8000000
je 0x47ca44
mov eax, dword [0x4ca25c]
mov ecx, dword [ebp + 0xc]
push eax
push ecx
call dword [sym.imp.GDI32.dll_SetTextColor]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 0xc]
movzx eax, bx
push eax
push esi
push 0xffffffffffffffff
push ecx
push edx
call dword [sym.imp.USER32.dll_DrawTextA]
test edi, edi
je 0x47ca6b
mov eax, dword [ebp - 8]
mov ecx, dword [ebp + 0xc]
push eax
push ecx
call dword [sym.imp.GDI32.dll_SetTextColor]
lea esp, [ebp - 0x14]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x47ce40
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, dword [esp + 8]
sub esp, 4
push ebx
push esi
mov esi, dword [esp + 0x10]
push edi
push ebp
push 2
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
test edi, edi
jne 0x47ce6b
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov esi, eax
test esi, esi
jne 0x47ce8f
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
push ebx
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebp, eax
test ebp, ebp
jne 0x47ceaa
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
mov edi, ebp
mov ecx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x20]
xor ecx, ecx
mov cl, ah
mov edx, eax
mov dword [esp + 0x10], 0
shl ecx, 8
shr edx, 0x10
mov byte [esp + 0x10], dl
xor edx, edx
or ecx, dword [esp + 0x10]
mov dl, al
shl edx, 0x10
mov eax, dword [esp + 0x28]
or ecx, edx
mov edx, eax
shr edx, 0x10
mov dword [ebp + 0x28], ecx
mov dword [esp + 0x10], 0
xor ecx, ecx
mov byte [esp + 0x10], dl
mov cl, ah
xor edx, edx
shl ecx, 8
mov dl, al
shl edx, 0x10
or ecx, dword [esp + 0x10]
or ecx, edx
mov eax, dword [esp + 0x24]
mov edx, eax
mov dword [ebp + 0x44], ecx
shr edx, 0x10
xor ecx, ecx
mov dword [esp + 0x10], 0
mov cl, ah
mov byte [esp + 0x10], dl
shl ecx, 8
xor edx, edx
or ecx, dword [esp + 0x10]
mov dl, al
shl edx, 0x10
mov eax, dword [esp + 0x2c]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x48], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
mov eax, dword [esp + 0x30]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x64], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
mov eax, dword [esp + 0x34]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x54], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
push 0
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
or ecx, edx
mov dword [ebp + 0x50], ecx
call dword [sym.imp.USER32.dll_GetDC]
mov edi, eax
push 0
push ebp
lea ecx, [ebp + 0x68]
push ecx
push 4
push ebp
push edi
call dword [sym.imp.GDI32.dll_CreateDIBitmap]
mov esi, eax
push edi
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, esi
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20