joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402480
Capabilities:
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
sub esp, 0x118
mov eax, dword [0x41f050]
xor eax, esp
mov dword [esp + 0x114], eax
push ebx
mov ebx, dword [esp + 0x124]
push esi
mov esi, dword [esp + 0x124]
push edi
push 0
push 2
push 2
mov dword [esp + 0x18], 1
call sub.WSOCK32.dll_socket
mov edi, eax
cmp edi, 0xffffffff
jne 0x4024fc
push 0x10
push str.Tftpd32
push str.Error_:_Cant_create_BootP_socket
push esi
call fcn.00403450
add esp, 0x10
push 0
push 0
push 0x10
push esi
call dword [sym.imp.USER32.dll_PostMessageA]
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [esp + 0x114]
xor ecx, esp
call fcn.0040c6a6
add esp, 0x118
ret
xor eax, eax
push 0x419840
mov dword [esp + 0x14], eax
push ebx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov word [esp + 0x18], 2
call sub.WSOCK32.dll_getservbyname
test eax, eax
je 0x40252a
mov ax, word [eax + 8]
jmp 0x402537
mov ecx, dword [esp + 0x130]
push ecx
call sub.WSOCK32.dll_htons
push 4
lea edx, [esp + 0x10]
push edx
push 0x20
push 0xffff
push edi
mov word [esp + 0x26], ax
call sub.WSOCK32.dll_setsockopt
test eax, eax
je 0x402565
push 0x10
push str.Tftpd32
push str.Error:_Cant_set_broadcast_option._nPlease_suppress_DHCP_server_in_the_global_settings
jmp 0x4024cb
cmp byte [0x41e3c0], 0
jne 0x402578
mov dword [esp + 0x14], 0
jmp 0x402586
push 0x41e3c0
call sub.WSOCK32.dll_inet_addr
mov dword [esp + 0x14], eax
push 0x10
lea eax, [esp + 0x14]
push eax
push edi
call sub.WSOCK32.dll_bind
cmp eax, 0xffffffff
jne 0x4025d0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0xffffffffffffffff
push 0x41e3c0
lea ecx, [esp + 0x2c]
push str.Error_Cant_bind_the_BOOTP_port_to_address__s__nEither_you_do_not_have_necessary_privilege_nor_a_BOOTP_daemon_is_already_started_nor_IP_configuration_has_changed_n_nbind_returns_error__d__GetLastError__d
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
push 0x10
push str.Tftpd32
lea edx, [esp + 0x3c]
push edx
push esi
call fcn.00403450
add esp, 0x24
jmp 0x4024d4
mov ecx, dword [esp + 0x120]
mov eax, edi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040c6a6
add esp, 0x118
ret

Function at 0x403130
Capabilities:
Get common file path

Disassembly:
sub esp, 0x20
xor eax, eax
push esi
mov esi, dword [esp + 0x2c]
push esi
push 0x104
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
cmp dword [esp + 0x30], 0
mov eax, dword [esp + 0x28]
mov dword [esp + 4], eax
mov dword [esp + 0x14], 1
mov dword [esp + 0x1c], esi
je 0x403189
mov dword [esp + 0x18], 0x403100
lea ecx, [esp + 4]
push ecx
call dword [sym.imp.SHELL32.dll_SHBrowseForFolderA]
test eax, eax
je 0x4031ae
push esi
push eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
test eax, eax
je 0x4031ae
mov eax, 1
pop esi
add esp, 0x20
ret
xor eax, eax
pop esi
add esp, 0x20
ret
Function at 0x403250
Capabilities:
Set environment variable

Disassembly:
mov eax, dword [esp + 4]
push esi
push 0x1ff
push eax
push 0x420870
call fcn.0040d530
add esp, 0xc
mov ecx, 0x420870
call fcn.004031c0
mov esi, 1
cmp dword [0x420af0], esi
jle 0x4032f7
push edi
mov edi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
jmp 0x403290
mov eax, dword [esi*4 + 0x420a70]
cmp byte [eax], 0x2d
jne 0x4032eb
cmp dword [esi*4 + 0x420a74], 0
je 0x4032eb
mov al, byte [eax + 1]
cmp al, 0x69
je 0x4032d9
cmp al, 0x6c
je 0x4032c7
cmp al, 0x73
jne 0x4032eb
mov ecx, dword [esi*4 + 0x420a74]
add esi, 1
push ecx
push str.TFTP_DIR
jmp 0x4032e9
mov edx, dword [esi*4 + 0x420a74]
add esi, 1
push edx
push str.TFTP_LOG
jmp 0x4032e9
mov eax, dword [esi*4 + 0x420a74]
add esi, 1
push eax
push str.TFTP_INI
call edi
add esi, 1
cmp esi, dword [0x420af0]
jl 0x403290
pop edi
mov eax, esi
pop esi
ret

Function at 0x403570
Capabilities:
Open clipboard
Write clipboard data

Disassembly:
push esi
push edi
mov edi, dword [esp + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push 0
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
je 0x4035c2
call dword [sym.imp.USER32.dll_EmptyClipboard]
push esi
push 1
call dword [sym.imp.USER32.dll_SetClipboardData]
call dword [sym.imp.USER32.dll_CloseClipboard]
pop edi
mov eax, 1
pop esi
ret

Function at 0x403860
Capabilities:
Hash data with md5

Disassembly:
mov eax, dword [esp + 4]
xor ecx, ecx
mov dword [eax + 0x14], ecx
mov dword [eax + 0x10], ecx
mov dword [eax], 0x67452301
mov dword [eax + 4], 0xefcdab89
mov dword [eax + 8], 0x98badcfe
mov dword [eax + 0xc], 0x10325476
ret
Function at 0x404430
Capabilities:
Query or enumerate registry value
Read .ini file

Disassembly:
sub esp, 0x44c
mov eax, dword [0x41f050]
xor eax, esp
mov dword [esp + 0x448], eax
mov eax, dword [esp + 0x45c]
push ebx
mov ebx, dword [esp + 0x454]
push ebp
mov ebp, dword [esp + 0x460]
push esi
mov esi, dword [esp + 0x470]
push edi
mov edi, dword [esp + 0x464]
push 0x5c
push ebx
mov dword [esp + 0x18], eax
call fcn.0040d670
add esp, 8
test eax, eax
jne 0x404482
mov eax, ebx
jmp 0x404485
add eax, 1
push 0x40
push eax
lea ecx, [esp + 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
push esi
push 0x400
lea edx, [esp + 0x60]
push edx
push 0
push edi
lea eax, [esp + 0x2c]
push eax
mov byte [esp + 0x6f], 0
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov esi, eax
test esi, esi
jle 0x4044f6
mov eax, dword [esp + 0x470]
sub eax, 1
je 0x4044da
sub eax, 3
jne 0x40453c
lea ecx, [esp + 0x58]
push ecx
call fcn.0040d665
add esp, 4
mov dword [ebp], eax
jmp 0x40453c
mov edx, dword [esp + 0x10]
push edx
lea eax, [esp + 0x5c]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
mov ecx, dword [esp + 0x10]
mov byte [ecx + ebp - 1], 0
jmp 0x40453c
lea edx, [esp + 0x14]
push edx
push 0x20019
push 0
push ebx
push reloc.WSOCK32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40453c
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x10]
push eax
push ebp
push 0
push 0
push edi
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edx, dword [esp + 0x14]
mov esi, eax
neg esi
sbb esi, esi
push edx
add esi, 1
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x458]
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040c6a6
add esp, 0x44c
ret
Function at 0x404560
Capabilities:
Set registry value

Disassembly:
sub esp, 0x48c
mov eax, dword [0x41f050]
xor eax, esp
mov dword [esp + 0x488], eax
push ebx
mov ebx, dword [esp + 0x49c]
push ebp
mov ebp, dword [esp + 0x49c]
push esi
mov esi, dword [esp + 0x4b0]
push edi
mov edi, dword [esp + 0x4a0]
push 0
push 0x80
push 3
push 0
push 1
push closesocket
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
je 0x40462f
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x5c
push edi
call fcn.0040d670
add esp, 8
test eax, eax
je 0x4045cb
lea edi, [eax + 1]
push edi
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [esp + 0x4b0]
sub eax, 1
je 0x40461f
sub eax, 3
jne 0x40469d
mov ecx, dword [ebx]
push ecx
lea edx, [esp + 0x9c]
push 0x419b78
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push esi
lea eax, [esp + 0x9c]
push eax
push ebp
lea ecx, [esp + 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
jmp 0x40469f
push esi
push ebx
push ebp
lea edx, [esp + 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
jmp 0x40469f
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x14]
push ecx
push 0
push 0x20006
push 0
push 0
push 0
push edi
push reloc.WSOCK32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x40469d
mov esi, dword [esp + 0x4b0]
cmp esi, 1
jne 0x40466d
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, esi
jmp 0x404674
mov eax, dword [esp + 0x4ac]
mov edx, dword [esp + 0x10]
push eax
push ebx
push esi
push 0
push ebp
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov esi, eax
mov eax, dword [esp + 0x10]
neg esi
sbb esi, esi
push eax
add esi, 1
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
jmp 0x40469f
xor eax, eax
mov ecx, dword [esp + 0x498]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040c6a6
add esp, 0x48c
ret
Function at 0x4047c0
Capabilities:
Create udp socket
Set socket configuration

Disassembly:
sub esp, 0x114
mov eax, dword [0x41f050]
xor eax, esp
mov dword [esp + 0x110], eax
push esi
mov esi, dword [esp + 0x11c]
push edi
push 0
push 2
push 2
call sub.WSOCK32.dll_socket
mov edi, eax
cmp edi, 0xffffffff
jne 0x40482a
push 0x10
push str.Tftpd32
push str.Error_:_Cant_create_socket
push esi
call fcn.00403450
add esp, 0x10
push 0
push 0
push 0x10
push esi
call dword [sym.imp.USER32.dll_PostMessageA]
or eax, edi
pop edi
pop esi
mov ecx, dword [esp + 0x110]
xor ecx, esp
call fcn.0040c6a6
add esp, 0x114
ret
xor eax, eax
push 0x419840
mov dword [esp + 0xc], eax
push 0x419c18
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov word [esp + 0x10], 2
call sub.WSOCK32.dll_getservbyname
test eax, eax
je 0x40485c
mov ax, word [eax + 8]
jmp 0x404863
push 0x7b
call sub.WSOCK32.dll_htons
cmp byte [0x41e3c0], 0
mov word [esp + 0xa], ax
jne 0x40487b
mov dword [esp + 0xc], 0
jmp 0x404889
push 0x41e3c0
call sub.WSOCK32.dll_inet_addr
mov dword [esp + 0xc], eax
push 0x10
lea ecx, [esp + 0xc]
push ecx
push edi
call sub.WSOCK32.dll_bind
cmp eax, 0xffffffff
jne 0x404908
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0xffffffffffffffff
lea edx, [esp + 0x20]
push str.Error_Cant_bind_the_SNTP_port__nEither_you_do_not_have_necessary_privilege_or_a_SNTP_daemon_is_already_started_n_nbind_returns_error__d__GetLastError__d
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
push 0x10
push str.Tftpd32
lea eax, [esp + 0x30]
push eax
push esi
call fcn.00403450
add esp, 0x20
push 0
push 0
push 0x10
push esi
call dword [sym.imp.USER32.dll_PostMessageA]
lea ecx, [esp + 0x18]
push ecx
push 0x6a4
push esi
call dword [sym.imp.USER32.dll_GetParent]
push eax
call dword [sym.imp.USER32.dll_SetDlgItemTextA]
pop edi
or eax, 0xffffffff
pop esi
mov ecx, dword [esp + 0x110]
xor ecx, esp
call fcn.0040c6a6
add esp, 0x114
ret
mov ecx, dword [esp + 0x118]
mov eax, edi
pop edi
pop esi
xor ecx, esp
call fcn.0040c6a6
add esp, 0x114
ret
Function at 0x404b60
Capabilities:
Create udp socket
Set socket configuration

Disassembly:
sub esp, 0x114
mov eax, dword [0x41f050]
xor eax, esp
mov dword [esp + 0x110], eax
push esi
mov esi, dword [esp + 0x11c]
push edi
push 0
push 2
push 2
call sub.WSOCK32.dll_socket
mov edi, eax
cmp edi, 0xffffffff
jne 0x404bcb
push 0x10
push str.Tftpd32
push str.Error_:_Cant_create_socket
push esi
call fcn.00403450
add esp, 0x10
push 0
push 0
push 0x10
push esi
call dword [sym.imp.USER32.dll_PostMessageA]
pop edi
or eax, 0xffffffff
pop esi
mov ecx, dword [esp + 0x110]
xor ecx, esp
call fcn.0040c6a6
add esp, 0x114
ret
xor eax, eax
push 0x419840
mov dword [esp + 0xc], eax
push str.syslog
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov word [esp + 0x10], 2
call sub.WSOCK32.dll_getservbyname
test eax, eax
je 0x404bfd
mov ax, word [eax + 8]
jmp 0x404c07
push 0x202
call sub.WSOCK32.dll_htons
cmp byte [0x41e3c0], 0
mov word [esp + 0xa], ax
jne 0x404c1f
mov dword [esp + 0xc], 0
jmp 0x404c2d
push 0x41e3c0
call sub.WSOCK32.dll_inet_addr
mov dword [esp + 0xc], eax
push 0x10
lea ecx, [esp + 0xc]
push ecx
push edi
call sub.WSOCK32.dll_bind
cmp eax, 0xffffffff
jne 0x404c72
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0xffffffffffffffff
lea edx, [esp + 0x20]
push str.Error_Cant_bind_the_SYSLOG_port__nEither_you_do_not_have_necessary_privilege_or_a_SYSLOG_daemon_is_already_started_n_nbind_returns_error__d__GetLastError__d
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
push 0x10
push str.Tftpd32
lea eax, [esp + 0x30]
push eax
push esi
call fcn.00403450
add esp, 0x20
jmp 0x404ba4
mov ecx, dword [esp + 0x118]
mov eax, edi
pop edi
pop esi
xor ecx, esp
call fcn.0040c6a6
add esp, 0x114
ret

Function at 0x4051d0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x234
mov eax, dword [0x41f050]
xor eax, esp
mov dword [esp + 0x230], eax
push ebx
push ebp
push edi
lea eax, [esi + 0x4498]
push eax
lea edi, [esi + 0x44f0]
push edi
call fcn.00404030
push 0x203
lea ecx, [esp + 0x40]
push ecx
lea edx, [esi + 0x4272]
push edx
mov ecx, esi
call fcn.00405110
add esp, 0x14
push str..md5
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0
push 0x8000020
push 2
push 0
push 1
push 0x40000000
lea ecx, [esp + 0x4c]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, dword [sym.imp.USER32.dll_wsprintfA]
mov ebp, eax
xor eax, eax
mov dword [esp + 0xc], eax
movzx edx, byte [edi + eax]
push edx
lea eax, [esp + eax*2 + 0x14]
push str._02x
push eax
call ebx
mov eax, dword [esp + 0x18]
add eax, 1
add esp, 0xc
cmp eax, 0x10
mov dword [esp + 0xc], eax
jl 0x405250
push 0
lea ecx, [esp + 0x10]
push ecx
push 0x20
lea edx, [esp + 0x1c]
push edx
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esi + 0x4474]
mov edx, dword [esi + 0x10]
lea eax, [esp + 0x34]
push eax
push str.MD5_written_into___s_
push ecx
push edx
push 2
call fcn.00409890
mov ecx, dword [esp + 0x250]
add esp, 0x14
pop edi
pop ebp
pop ebx
xor ecx, esp
xor eax, eax
call fcn.0040c6a6
add esp, 0x234
ret
Function at 0x405370
Capabilities:
Send data
Send data on socket
Set socket configuration

Disassembly:
sub esp, 0x14
mov eax, dword [0x41f050]
xor eax, esp
mov dword [esp + 0x10], eax
xor eax, eax
mov dword [esp + 5], eax
mov dword [esp + 9], eax
mov word [esp + 0xd], ax
mov byte [esp + 0xf], al
movzx eax, word [0x41e5ec]
push esi
mov esi, dword [esp + 0x1c]
push eax
mov word [esp + 8], 2
mov word [esp + 0xa], 0
mov byte [esp + 0xc], 0
call sub.WSOCK32.dll_htons
push 0x41e5dc
mov word [esp + 0xa], ax
call sub.WSOCK32.dll_inet_addr
mov edx, dword [esi + 0x34]
push 0x10
lea ecx, [esp + 8]
push ecx
mov ecx, dword [esi + 0x18]
push 0
add edx, 4
mov dword [esp + 0x14], eax
push edx
lea eax, [esi + 0x58]
push eax
push ecx
call sub.WSOCK32.dll_sendto
mov ecx, dword [esp + 0x14]
pop esi
xor ecx, esp
call fcn.0040c6a6
add esp, 0x14
ret
Function at 0x405650
Capabilities:
Send data
Send data on socket

Disassembly:
push esi
mov esi, dword [esp + 8]
add dword [esi + 0x34], 2
mov eax, dword [esi + 0x34]
push edi
mov edi, dword [esi + 0x10]
push eax
mov eax, dword [esi + 0x4474]
push str.send_OACK__d_bytes
push eax
push edi
push 0xa
call fcn.00409890
mov ecx, dword [esi + 0x34]
mov eax, dword [esi + 0x18]
add esp, 0x14
push 0
push ecx
lea edx, [esi + 0x405c]
push edx
push eax
call sub.WSOCK32.dll_send
test eax, eax
jl 0x40569f
cmp eax, dword [esi + 0x34]
jne 0x40569f
pop edi
mov eax, 1
pop esi
ret
call sub.WSOCK32.dll_WSAGetLastError
mov ecx, dword [esi + 0x4474]
push eax
push str.send_:_Error__d
push ecx
push edi
push 0
call fcn.00409890
add esp, 0x14
pop edi
xor eax, eax
pop esi
ret

Function at 0x4057e0
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, dword [esp + 8]
push esi
push edi
push 5
lea edi, [ebx + 0x58]
call sub.WSOCK32.dll_htons
push ebp
mov word [edi], ax
call sub.WSOCK32.dll_htons
mov word [edi + 2], ax
cmp dword [0x41e1d0], 0
mov esi, 0x41e1d0
jl 0x405821
lea esp, [esp]
cmp dword [esi], ebp
je 0x40581c
add esi, 8
cmp dword [esi], 0
jge 0x405810
cmp dword [esi], 0
jge 0x405836
add ebp, 0xffffff9c
push ebp
call fcn.0040dd9d
mov dword [esi + 4], eax
add esp, 4
mov word [edi + 2], 0
mov eax, dword [esi + 4]
push eax
lea ecx, [edi + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov edx, dword [esi + 4]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
mov byte [esi + edi + 4], 0
mov eax, dword [ebx + 0x18]
push 0
add esi, 5
push esi
push edi
push eax
call sub.WSOCK32.dll_send
sub eax, esi
pop edi
neg eax
pop esi
sbb eax, eax
pop ebp
ret
Function at 0x405e60
Capabilities:
Get socket status

Disassembly:
sub esp, 0x10c
mov eax, dword [edi + 0x18]
mov dword [esp + 0xc], eax
mov eax, dword [edi + 0x38]
sub eax, 0
mov dword [esp + 8], 1
mov dword [esp + 4], 0
je 0x405e9f
sub eax, 1
je 0x405e92
mov ecx, dword [edi + 0x44]
mov dword [esp], ecx
jmp 0x405eab
mov edx, dword [edi + 0x44]
add edx, 1
shr edx, 1
mov dword [esp], edx
jmp 0x405eab
mov eax, dword [edi + 0x44]
add eax, 3
shr eax, 2
mov dword [esp], eax
lea ecx, [esp]
push ecx
push 0
push 0
lea edx, [esp + 0x14]
push edx
push 1
call sub.WSOCK32.dll_select
cmp eax, 0xffffffff
jne 0x405ed7
push esi
push 0
mov esi, str.select
mov ecx, edi
call fcn.00405de0
add esp, 4
pop esi
add esp, 0x10c
ret
Function at 0x407b90
Capabilities:
Delete file
Send data
Send data on socket

Disassembly:
sub esp, 0x204
mov eax, dword [0x41f050]
xor eax, esp
mov dword [esp + 0x200], eax
push 5
call sub.WSOCK32.dll_htons
push 0
mov word [0x421b81], ax
call sub.WSOCK32.dll_htons
push 0
push 4
mov word [0x421b83], ax
mov eax, dword [0x429b95]
push 0x421b81
push eax
call sub.WSOCK32.dll_send
call fcn.00407a90
mov edx, dword [esp + 0x208]
lea ecx, [esp + 0x20c]
push ecx
push edx
lea eax, [esp + 8]
push eax
call dword [sym.imp.USER32.dll_wvsprintfA]
mov edx, dword [0x42196c]
push 0x10
push str.Tftpd32
lea ecx, [esp + 8]
push ecx
push edx
call fcn.00403450
mov eax, dword [0x421978]
add esp, 0x10
push 0
push 1
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
cmp byte [0x421980], 1
jne 0x407c3a
cmp dword [0x429b91], 0
je 0x407c3a
push 0x421981
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ecx, dword [esp + 0x200]
xor ecx, esp
xor eax, eax
call fcn.0040c6a6
add esp, 0x204
ret
Function at 0x408010
Capabilities:
Send data
Send data on socket

Disassembly:
push ebx
mov ebx, dword [sym.imp.USER32.dll_SetTimer]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
push esi
push edi
mov edi, 0x425b87
cmp byte [edi], 0
je 0x408111
mov eax, edi
sub eax, 0x425b85
add eax, 0xfffffffe
cmp eax, 0x200
mov esi, edi
jge 0x408053
cmp byte [esi], 0
je 0x408053
add eax, 1
add esi, 1
cmp eax, 0x200
jl 0x408041
add esi, 1
mov ecx, esi
sub ecx, 0x425b85
sub ecx, 2
cmp ecx, 0x200
je 0x40811b
cmp byte [0x421980], 1
jne 0x4080d5
push str.tsize
push edi
call ebp
test eax, eax
jne 0x4080d5
push esi
call fcn.0040d665
add esp, 4
push 4
mov dword [0x429bbd], eax
call sub.WSOCK32.dll_htons
push 0
mov word [0x421b81], ax
call sub.WSOCK32.dll_htons
mov edx, dword [0x429ba9]
push 0
push edx
mov word [0x421b83], ax
mov eax, dword [0x42196c]
push 0x659
push eax
call ebx
mov ecx, dword [0x429b95]
push 0
push 4
push 0x421b81
push ecx
call sub.WSOCK32.dll_send
push str.blksize
push edi
call ebp
test eax, eax
jne 0x4080ef
push esi
call fcn.0040d665
add esp, 4
mov dword [0x429bc9], eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edi, [eax + esi + 1]
mov edx, edi
sub edx, 0x425b85
sub edx, 2
cmp edx, 0x200
jl 0x408025
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret

Function at 0x408130
Capabilities:
Connect socket
Receive data
Receive data on socket

Disassembly:
sub esp, 0x18
mov eax, dword [0x41f050]
xor eax, esp
mov dword [esp + 0x14], eax
cmp dword [0x429b99], 0
push esi
mov dword [0x429b91], 0
mov dword [esp + 4], 0x10
jne 0x40817e
mov edx, dword [0x429b95]
lea eax, [esp + 4]
push eax
lea ecx, [esp + 0xc]
push ecx
push 0
push 0x4004
push 0x425b85
push edx
call sub.WSOCK32.dll_recvfrom
jmp 0x408195
mov eax, dword [0x429b95]
push 0
push 0x4004
push 0x425b85
push eax
call sub.WSOCK32.dll_recv
mov esi, eax
cmp esi, 0xffffffff
jne 0x4081ae
xor eax, eax
pop esi
mov ecx, dword [esp + 0x14]
xor ecx, esp
call fcn.0040c6a6
add esp, 0x18
ret
cmp dword [0x429b99], 0
jne 0x4081d6
mov ecx, dword [esp + 4]
mov eax, dword [0x429b95]
push ecx
lea edx, [esp + 0xc]
push edx
push eax
call sub.WSOCK32.dll_connect
mov dword [0x429b99], 1
mov ecx, dword [esp + 0x18]
mov dword [0x429b91], esi
pop esi
xor ecx, esp
mov eax, 1
call fcn.0040c6a6
add esp, 0x18
ret
Function at 0x408200
Capabilities:
Get file size

Disassembly:
movzx eax, byte [0x421980]
sub eax, 1
push esi
push edi
je 0x40827c
sub eax, 1
jne 0x40826a
push 0
push 0x8000020
push 3
push 0
push 1
push closesocket
push 0x421981
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [0x429b9d], eax
jne 0x40825c
call fcn.004034f0
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x421981
push str.Error_opening_file__s_for_reading_nreturn_code_is__d___s_
call fcn.00407b90
add esp, 0x10
pop edi
pop esi
ret
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [0x429bbd], eax
mov eax, dword [0x429b9d]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
pop edi
pop esi
mov eax, ecx
ret
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0
push 0x8000020
push 1
push 0
push 0
push 0x40000000
push 0x421981
call esi
cmp eax, 0xffffffff
mov dword [0x429b9d], eax
jne 0x40826f
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0x50
jne 0x40826a
mov eax, dword [0x42196c]
push 3
push str.Tftpd32
push str.File_exists__overwrite_it__
push eax
call fcn.00403450
add esp, 0x10
cmp eax, 6
jne 0x40826a
push 0
push 0x8000020
push 2
push 0
push 0
push 0x40000000
push 0x421981
call esi
cmp eax, 0xffffffff
mov dword [0x429b9d], eax
jne 0x40826f
call fcn.004034f0
push eax
call edi
push eax
push 0x421981
push str.Error_opening_file__s_for_writing_nreturn_code_is__d___s_
call fcn.00407b90
add esp, 0x10
pop edi
pop esi
ret