joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1005cb92
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x54
mov eax, ecx
movzx ecx, byte [0x10108927]
mov dword [esp + 0x50], eax
push ebx
mov ebx, dword [0x10108934]
lea edx, [eax + 1]
movzx eax, bl
add dl, byte [esp + 0x38]
imul ecx, eax
mov ax, word [0x10108914]
push esi
mov esi, 0x81
mov byte [0x10108916], dl
push edi
mov byte [0x10108927], cl
movzx ecx, bx
add ax, cx
add ax, ax
sub ax, cx
add ax, si
cmp dword [str.__zbK], 0x125c
movzx eax, ax
jne 0x1005cbff
sub dl, byte [0x10108978]
mov byte [0x10108916], dl
sub eax, dword [esp + 0x40]
mov ebx, dword [0x10108930]
sub eax, ecx
add eax, 0xffffffa8
mov word [0x10108914], ax
movzx esi, ax
movzx eax, byte [0x10108930]
cmp eax, ebx
ja 0x1005cc3d
mov eax, dword [0x10108934]
mov byte [0x1010892f], al
lea eax, [ebx + 0x6fc]
add eax, ecx
mov word [0x10108914], ax
movzx esi, ax
movzx eax, si
movzx ecx, dl
sub ecx, eax
mov dword [0x101a099c], 0x1010a7d0
mov eax, dword [esp + 0x40]
add eax, 0x1d
add ecx, eax
call fcn.1005c63f
mov cx, word [0x10108914]
mov edx, dword [0x10108934]
movzx eax, ax
push 0x18
mov dword [esp + 0x50], eax
pop esi
movzx eax, cx
mov ecx, eax
mov edi, eax
movzx eax, byte [0x10108921]
cmp cx, ax
je 0x1005ccab
add byte [esi + 0x10108920], bl
sub ecx, ebx
sub ecx, edx
lea edx, [ebx + 0x32]
add ecx, 0xffffffa8
movzx eax, cx
add edx, eax
movzx edi, cx
dec esi
mov dword [0x10108934], edx
cmp esi, 1
jg 0x1005cc74
movzx eax, byte [0x10108916]
lea ecx, [edi - 0x1b]
imul eax, eax, 0x5a
add ecx, edx
sub dl, byte [esp + 0x4c]
push 0x1d
mov word [0x10108914], cx
add al, cl
mov byte [0x10108916], al
pop eax
add dl, al
add byte [0x10108928], dl
push 3
pop eax
mov ecx, eax
call fcn.1005c8e8
movzx edi, byte [0x10108916]
sub esp, 0xc
movzx esi, ax
movzx eax, word [0x10108914]
mov edx, esi
sub edi, eax
call fcn.1005c6ea
mov edx, dword [0x10108934]
add esp, 0xc
mov ebx, dword [0x10108930]
mov al, dl
sub al, bl
push 0x1d
pop ecx
add al, cl
mov ecx, 0x211fe64
add byte [0x10108928], al
lea eax, [edx + 0x2e0e]
cmp byte [0x10108933], 4
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x44], ecx
je 0x1005cd3f
add esi, 0x32
add esi, edx
jmp 0x1005cd46
sub esi, edx
add esi, 0x20
add esi, edi
movzx edi, ax
movzx eax, byte [0x10108916]
push 0xffffffffffffffa8
pop ecx
sub ecx, eax
sub ecx, edi
add esi, ecx
cmp edi, edx
jb 0x1005cd7a
lea eax, [ebx + 0x32]
movzx edx, bl
mov dh, 0xd3
Function at 0x1005e404
Capabilities:
Get common file path

Disassembly:
movzx eax, byte [0x10108916]
push 6
pop ecx
push 0x101098f0
push dword [0x10108918]
sub ecx, eax
mov dword [0x10108934], ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov dword [0x10108910], eax
add eax, 0xffffffe8
mov dword [0x10108934], eax
add eax, 0x6ff
push 3
mov dword [0x10108918], eax
pop eax
ret
Function at 0x401ac0
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x1b
mov dword [esp + 4], 1
lea ebx, [esp + 0x24]
mov dword [esp], str.Mingw_w64_runtime_failure:_n
add eax, 0x40
mov dword [esp + 0xc], eax
call sym._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 sym._vfprintf
call sym._abort
jmp dbg.mark_section_writable

Function at 0x401b20
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
sub esp, 0x30
mov esi, dword [0x405050]
test esi, esi
jle 0x401c0d
mov edi, dword [0x405054]
xor ebx, ebx
lea edx, [edi + 4]
nop
mov ecx, dword [edx]
cmp ecx, eax
ja 0x401b54
mov edi, dword [edx + 4]
add ecx, dword [edi + 8]
cmp eax, ecx
jb 0x401c06
add ebx, 1
add edx, 0xc
cmp ebx, esi
jne 0x401b40
mov dword [esp], eax
mov ebx, eax
call dbg.__mingw_GetSectionForAddress
test eax, eax
mov edi, eax
je 0x401c4a
lea ebx, [esi + esi*2]
mov esi, dword [0x405054]
shl ebx, 2
add esi, ebx
mov dword [esi + 8], eax
mov dword [esi], 0
call dbg._GetPEImageBase
add eax, dword [edi + 0xc]
mov dword [esi + 4], eax
lea eax, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], eax
mov eax, dword [0x405054]
mov eax, dword [eax + ebx + 4]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x401c2a
mov eax, dword [esp + 0x28]
lea edx, [eax - 4]
and edx, 0xfffffffb
je 0x401bff
sub eax, 0x40
and eax, 0xffffffbf
je 0x401bff
mov eax, dword [esp + 0x20]
add ebx, dword [0x405054]
mov dword [esp + 8], 0x40
mov dword [esp + 4], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0xc], ebx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
je 0x401c14
add dword [0x405050], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
xor esi, esi
jmp 0x401b5e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call dbg.__report_error
mov eax, dword [0x405054]
mov eax, dword [eax + ebx + 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 dbg.__report_error
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call dbg.__report_error
lea esi, [esi]
Function at 0x402110
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x405408
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x405400]
sub esp, 4
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test ebx, ebx
je 0x402165
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 0x40215e
test esi, esi
je 0x40215e
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x402140
mov dword [esp], 0x405408
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x402380
Capabilities:
Enumerate pe sections

Disassembly:
push esi
push ebx
mov edx, dword [esp + 0xc]
mov ebx, dword [esp + 0x10]
add edx, dword [edx + 0x3c]
movzx esi, word [edx + 6]
movzx eax, word [edx + 0x14]
test esi, esi
lea eax, [edx + eax + 0x18]
je 0x4023b8
xor ecx, ecx
nop
mov edx, dword [eax + 0xc]
cmp edx, ebx
ja 0x4023ae
add edx, dword [eax + 8]
cmp ebx, edx
jb 0x4023ba
add ecx, 1
add eax, 0x28
cmp ecx, esi
jne 0x4023a0
xor eax, eax
pop ebx
pop esi
ret
Function at 0x4022b0
Capabilities:
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
sub esp, 0x114
push esi
push 0
push 2
push 2
mov dword [esp + 0x20], 1
call sub.WSOCK32.dll_socket
mov esi, eax
cmp esi, 0xffffffff
jne 0x4022f2
mov esi, dword [esp + 0x11c]
push 0x10
push str.Tftpd32
push str.Error_:_Cant_create_BootP_socket
push esi
call fcn.00403120
add esp, 0x10
jmp 0x4023bb
mov ecx, dword [esp + 0x120]
xor eax, eax
mov dword [esp + 4], eax
push ecx
mov dword [esp + 0xc], eax
mov word [esp + 8], 2
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
call sub.WSOCK32.dll_htons
lea edx, [esp + 0x14]
push 4
push edx
push 0x20
push 0xffff
push esi
mov word [esp + 0x1a], ax
call sub.WSOCK32.dll_setsockopt
test eax, eax
je 0x402353
mov esi, dword [esp + 0x11c]
push 0x10
push str.Tftpd32
push str.Error:_Cant_set_broadcast_option._nPlease_suppress_DHCP_server_in_the_global_settings
push esi
call fcn.00403120
add esp, 0x10
jmp 0x4023bb
mov al, byte [0x413840]
test al, al
jne 0x402366
mov dword [esp + 8], 0
jmp 0x402374
push 0x413840
call sub.WSOCK32.dll_inet_addr
mov dword [esp + 8], eax
lea eax, [esp + 4]
push 0x10
push eax
push esi
call sub.WSOCK32.dll_bind
cmp eax, 0xffffffff
jne 0x4023d3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0xffffffffffffffff
lea ecx, [esp + 0x20]
push str.Error_Cant_bind_the_BOOTP_port__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]
mov esi, dword [esp + 0x12c]
push 0x10
lea edx, [esp + 0x2c]
push str.Tftpd32
push edx
push esi
call fcn.00403120
add esp, 0x20
push 0
push 0
push 0x10
push esi
call dword [sym.imp.USER32.dll_PostMessageA]
or eax, 0xffffffff
pop esi
add esp, 0x114
ret
mov eax, esi
pop esi
add esp, 0x114
ret
Function at 0x402f00
Capabilities:
Get common file path

Disassembly:
sub esp, 0x20
push esi
mov esi, dword [esp + 0x2c]
push edi
mov ecx, 8
xor eax, eax
lea edi, [esp + 8]
push esi
push 0x104
rep stosd dword es:[edi], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x18], 1
mov dword [esp + 8], eax
mov eax, dword [esp + 0x34]
test eax, eax
mov dword [esp + 0x20], esi
je 0x402f46
mov dword [esp + 0x1c], 0x402f80
lea ecx, [esp + 8]
push ecx
call dword [sym.imp.SHELL32.dll_SHBrowseForFolderA]
test eax, eax
je 0x402f6c
push esi
push eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
test eax, eax
je 0x402f6c
pop edi
mov eax, 1
pop esi
add esp, 0x20
ret
pop edi
xor eax, eax
pop esi
add esp, 0x20
ret

Function at 0x403210
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]
inc eax
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 0x403260
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 0x403690
Capabilities:
Create udp socket

Disassembly:
sub esp, 0x110
push esi
push 0
push 2
push 2
call sub.WSOCK32.dll_socket
mov esi, eax
cmp esi, 0xffffffff
jne 0x4036dd
mov esi, dword [esp + 0x118]
push 0x10
push str.Tftpd32
push str.Error_:_Cant_create_socket
push esi
call fcn.00403120
add esp, 0x10
push 0
push 0
push 0x10
push esi
call dword [sym.imp.USER32.dll_PostMessageA]
or eax, 0xffffffff
pop esi
add esp, 0x110
ret
xor eax, eax
push 0x412838
mov dword [esp + 8], eax
push 0x412834
mov dword [esp + 0x10], eax
mov word [esp + 0xc], 2
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
call sub.WSOCK32.dll_getservbyname
test eax, eax
je 0x403714
mov cx, word [eax + 8]
mov word [esp + 6], cx
jmp 0x403720
push 0x7b
call sub.WSOCK32.dll_htons
mov word [esp + 6], ax
lea edx, [esp + 4]
push 0x10
push edx
push esi
mov dword [esp + 0x14], 0
call sub.WSOCK32.dll_bind
cmp eax, 0xffffffff
jne 0x40379f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0xffffffffffffffff
lea eax, [esp + 0x1c]
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 eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov esi, dword [esp + 0x128]
push 0x10
lea ecx, [esp + 0x28]
push str.Tftpd32
push ecx
push esi
call fcn.00403120
add esp, 0x20
push 0
push 0
push 0x10
push esi
call dword [sym.imp.USER32.dll_PostMessageA]
lea edx, [esp + 0x14]
push edx
push 0x6a4
push esi
call dword [sym.imp.USER32.dll_GetParent]
push eax
call dword [sym.imp.USER32.dll_SetDlgItemTextA]
or eax, 0xffffffff
pop esi
add esp, 0x110
ret
mov eax, esi
pop esi
add esp, 0x110
ret

Function at 0x4039e0
Capabilities:
Create udp socket

Disassembly:
sub esp, 0x110
push esi
push 0
push 2
push 2
call sub.WSOCK32.dll_socket
mov esi, eax
cmp esi, 0xffffffff
jne 0x403a1a
mov esi, dword [esp + 0x118]
push 0x10
push str.Tftpd32
push str.Error_:_Cant_create_socket
push esi
call fcn.00403120
add esp, 0x10
jmp 0x403aaf
xor eax, eax
push 0x412838
mov dword [esp + 8], eax
push str.syslog
mov dword [esp + 0x10], eax
mov word [esp + 0xc], 2
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
call sub.WSOCK32.dll_getservbyname
test eax, eax
je 0x403a51
mov cx, word [eax + 8]
mov word [esp + 6], cx
jmp 0x403a60
push 0x202
call sub.WSOCK32.dll_htons
mov word [esp + 6], ax
lea edx, [esp + 4]
push 0x10
push edx
push esi
mov dword [esp + 0x14], 0
call sub.WSOCK32.dll_bind
cmp eax, 0xffffffff
jne 0x403ac7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0xffffffffffffffff
lea eax, [esp + 0x1c]
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 eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov esi, dword [esp + 0x128]
push 0x10
lea ecx, [esp + 0x28]
push str.Tftpd32
push ecx
push esi
call fcn.00403120
add esp, 0x20
push 0
push 0
push 0x10
push esi
call dword [sym.imp.USER32.dll_PostMessageA]
or eax, 0xffffffff
pop esi
add esp, 0x110
ret
mov eax, esi
pop esi
add esp, 0x110
ret
Function at 0x404aa0
Capabilities:
Get graphical window text
Hide graphical window

Disassembly:
sub esp, 0x108
push ebx
push ebp
push esi
mov esi, dword [esp + 0x118]
push edi
mov eax, dword [esi + 0x20]
test eax, eax
je 0x404cc0
lea ecx, [esp + 0x18]
push 0x100
push ecx
push eax
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov al, byte [esp + 0x18]
mov ebx, dword [sym.imp.USER32.dll_wsprintfA]
mov ebp, dword [sym.imp.USER32.dll_GetDlgItem]
test al, al
jne 0x404bf2
mov edx, dword [esi + 0x20]
mov edi, dword [sym.imp.USER32.dll_ShowWindow]
push 5
push edx
call edi
mov ax, word [esi + 0x4268]
push eax
call sub.WSOCK32.dll_ntohs
cmp ax, 1
mov dword [esp + 0x10], 0x412ed0
je 0x404b16
mov dword [esp + 0x10], str.from
mov ecx, dword [esi + 0x425c]
push ecx
call sub.WSOCK32.dll_inet_ntoa
mov edx, dword [esp + 0x10]
push eax
lea eax, [esi + 0x426a]
push edx
push eax
lea ecx, [esp + 0x24]
push str._s__s__s
push ecx
call ebx
mov eax, dword [esi + 0x20]
add esp, 0x14
lea edx, [esp + 0x18]
push edx
push eax
call dword [sym.imp.USER32.dll_SetWindowTextA]
mov eax, dword [esi + 0x4478]
test eax, eax
je 0x404b69
push eax
lea ecx, [esp + 0x1c]
push str.File_size_:__d
push ecx
call ebx
add esp, 0xc
jmp 0x404bdb
lea edx, [esp + 0x18]
push str.File_size_:_Unknown
push edx
call ebx
mov eax, dword [esi + 0x20]
add esp, 8
push 0
push 0x4b0
push eax
call ebp
push eax
call edi
mov edi, dword [sym.imp.USER32.dll_GetDialogBaseUnits]
push 0x206
call edi
shr eax, 0x10
lea ecx, [eax*8]
sub ecx, eax
lea eax, [ecx + ecx*4]
cdq
and edx, 7
add eax, edx
sar eax, 3
push eax
call edi
mov ecx, eax
and ecx, 0xffff
mov eax, ecx
shl eax, 6
add eax, ecx
mov ecx, dword [esi + 0x20]
shl eax, 1
cdq
and edx, 3
add eax, edx
sar eax, 2
push eax
push 0
push 0
push 0
push ecx
call dword [sym.imp.USER32.dll_SetWindowPos]
mov eax, dword [esi + 0x20]
lea edx, [esp + 0x18]
push edx
push 0x4b1
push eax
call ebp
push eax
call dword [sym.imp.USER32.dll_SetWindowTextA]
lea ecx, [esp + 0x14]
push ecx
call fcn.0040a446
mov edx, dword [esi + 0x4480]
mov eax, dword [esp + 0x18]
add esp, 4
cmp edx, eax
je 0x404cc0
mov eax, dword [esi + 0x20]
push 0x4b0
push eax
call ebp
mov ecx, dword [esi + 0x4478]
mov edi, eax
cmp ecx, 0x64
jbe 0x404c4e
mov eax, 0x51eb851f
push 0
mul ecx
mov eax, dword [esi + 0x4470]
mov ecx, edx
shr ecx, 5
xor edx, edx
div ecx
push eax
push 0x402
push edi
call dword [sym.imp.USER32.dll_SendMessageA]
mov dx, word [esi + 0x4268]
push edx
call sub.WSOCK32.dll_ntohs
cmp ax, 1
mov dword [esp + 0x10], str.sent
je 0x404c71
mov dword [esp + 0x10], str.rcvd
mov edi, dword [esp + 0x14]
mov eax, dword [esi + 0x447c]
mov ecx, dword [esi + 0x4470]
sub edi, eax
mov eax, ecx
xor edx, edx
div edi
push eax
mov eax, dword [esp + 0x14]
push eax
push ecx
lea ecx, [esp + 0x24]
push str._d_Bytes__s__t__d_Bytes_sec
push ecx
call ebx
mov eax, dword [esi + 0x20]
add esp, 0x14
lea edx, [esp + 0x18]
push edx
push 0x4b2
push eax
call ebp
push eax
call dword [sym.imp.USER32.dll_SetWindowTextA]
mov ecx, dword [esp + 0x14]
mov dword [esi + 0x4480], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x108
ret
Function at 0x405c90
Capabilities:
Send data
Send data on socket

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push ebp
push esi
push edi
push 5
lea edi, [ebx + 0x50]
call sub.WSOCK32.dll_htons
mov ebp, dword [esp + 0x18]
mov word [edi], ax
push ebp
call sub.WSOCK32.dll_htons
mov word [edi + 2], ax
mov eax, dword [0x412948]
test eax, eax
mov esi, 0x412948
jl 0x405ccf
cmp eax, ebp
je 0x405ccf
mov eax, dword [esi + 8]
add esi, 8
test eax, eax
jge 0x405cc1
cmp dword [esi], 0
jge 0x405ce9
add ebp, 0xffffff9c
push ebp
call fcn.0040ab1c
mov dword [esi + 4], eax
add esp, 4
mov word [edi + 2], 0
mov eax, dword [esi + 4]
lea ecx, [edi + 4]
push eax
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
push 0
mov byte [esi + edi + 4], 0
mov eax, dword [ebx + 0x18]
add esi, 5
push esi
push edi
push eax
call sub.WSOCK32.dll_send
sub eax, esi
pop edi
neg eax
pop esi
pop ebp
sbb eax, eax
pop ebx
ret

Function at 0x405dc0
Capabilities:
Delete file
Send data
Send data on socket

Disassembly:
sub esp, 0x200
push ebx
push esi
push edi
push 5
call sub.WSOCK32.dll_htons
push 0
mov word [0x415e59], ax
call sub.WSOCK32.dll_htons
mov word [0x415e5b], ax
mov eax, dword [0x41626d]
push 0
push 4
push 0x415e59
push eax
call sub.WSOCK32.dll_send
mov ecx, dword [0x416f00]
mov edx, dword [0x41626d]
push 0
push 0
push ecx
push edx
call sub.WSOCK32.dll_WSAAsyncSelect
mov eax, dword [0x416f00]
mov esi, dword [sym.imp.USER32.dll_KillTimer]
push 0x659
push eax
call esi
mov ecx, dword [0x416f00]
push 0x65a
push ecx
call esi
mov edx, dword [0x41626d]
push edx
call sub.WSOCK32.dll_closesocket
mov eax, dword [0x416275]
or esi, 0xffffffff
push eax
mov dword [0x41626d], esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [0x416f00]
push 1
mov dword [0x416275], esi
mov esi, dword [sym.imp.USER32.dll_GetParent]
push 0x7d4
push ecx
mov dword [0x416271], 0
call esi
mov edi, dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call edi
mov ebx, dword [sym.imp.USER32.dll_EnableWindow]
push eax
call ebx
mov edx, dword [0x416f00]
push 1
push 0x7d3
push edx
call esi
push eax
call edi
push eax
call ebx
mov eax, dword [0x416f00]
push 0
push 0x7d8
push eax
call esi
push eax
call edi
push eax
call ebx
mov ecx, dword [0x416f00]
push 0x415c54
push 0x7d9
push ecx
call esi
push eax
call dword [sym.imp.USER32.dll_SetDlgItemTextA]
push 0
push 0
mov edx, dword [0x416f00]
push 0x402
push 0x7d7
push edx
call esi
push eax
call dword [sym.imp.USER32.dll_SendDlgItemMessageA]
mov ecx, dword [esp + 0x210]
lea eax, [esp + 0x214]
push eax
lea edx, [esp + 0x10]
push ecx
push edx
call dword [sym.imp.USER32.dll_wvsprintfA]
mov ecx, dword [0x416f00]
push 0x10
lea eax, [esp + 0x10]
push str.Tftpd32
push eax
push ecx
call fcn.00403120
mov al, byte [0x415c58]
add esp, 0x10
cmp al, 1
pop edi
pop esi
pop ebx
jne 0x405f41
mov eax, dword [0x416269]
test eax, eax
je 0x405f41
push 0x415c59
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
xor eax, eax
add esp, 0x200
ret
Function at 0x405f50
Capabilities:
Get file size

Disassembly:
mov eax, dword [0x415c58]
push esi
and eax, 0xff
push edi
dec eax
je 0x405fcb
dec eax
jne 0x405fb9
push 0
push 0x8000020
push 3
push 0
push 1
push closesocket
push 0x415c59
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [0x416275], eax
jne 0x405fab
call fcn.004031a0
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x415c59
push str.Error_opening_file__s_for_reading_nreturn_code_is__d___s_
call fcn.00405dc0
add esp, 0x10
pop edi
pop esi
ret
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [0x41628d], eax
mov eax, dword [0x416275]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
pop edi
mov eax, ecx
pop esi
ret
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0
push 0x8000020
push 1
push 0
push 0
push 0x40000000
push 0x415c59
call esi
cmp eax, 0xffffffff
mov dword [0x416275], eax
jne 0x405fbe
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0x50
jne 0x405fb9
mov eax, dword [0x416f00]
push 3
push str.Tftpd32
push str.File_exists__overwrite_it__
push eax
call fcn.00403120
add esp, 0x10
cmp eax, 6
jne 0x405fb9
push 0
push 0x8000020
push 2
push 0
push 0
push 0x40000000
push 0x415c59
call esi
cmp eax, 0xffffffff
mov dword [0x416275], eax
jne 0x405fbe
call fcn.004031a0
push eax
call edi
push eax
push 0x415c59
push str.Error_opening_file__s_for_writing_nreturn_code_is__d___s_
call fcn.00405dc0
add esp, 0x10
pop edi
pop esi
ret
Function at 0x406ef0
Capabilities:
Resolve dns
Send data
Send data on socket
Set socket configuration

Disassembly:
sub esp, 0x14
xor eax, eax
push esi
mov dword [esp + 8], eax
mov esi, 2
mov dword [esp + 0xc], eax
mov word [esp + 8], si
mov dword [esp + 0x10], eax
push eax
push esi
push esi
mov dword [esp + 0x20], eax
call sub.WSOCK32.dll_socket
cmp eax, 0xffffffff
mov dword [0x41626d], eax
je 0x4070aa
lea ecx, [esp + 8]
push 0x10
push ecx
push eax
call sub.WSOCK32.dll_bind
cmp eax, 0xffffffff
je 0x4070aa
movzx dx, byte [0x415c58]
push edx
call sub.WSOCK32.dll_htons
mov dword [0x416265], esi
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0x415c59
push 0x415e5b
mov word [0x415e59], ax
call esi
push 0x415c59
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [0x416265]
push str.octet
lea eax, [ecx + eax + 1]
mov dword [0x416265], eax
lea edx, [eax + 0x415e59]
push edx
call esi
mov eax, dword [0x416265]
push str.tsize
add eax, 6
mov dword [0x416265], eax
lea eax, [eax + 0x415e59]
push eax
call esi
mov eax, dword [0x416265]
mov ecx, dword [0x41628d]
add eax, 6
push ecx
push 0x412ad0
mov dword [0x416265], eax
lea edx, [eax + 0x415e59]
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
mov ecx, dword [0x416265]
add esp, 0xc
lea edx, [ecx + eax + 1]
push 0x415d59
mov dword [0x416265], edx
call sub.WSOCK32.dll_inet_addr
mov esi, eax
cmp esi, 0xffffffff
mov dword [esp + 4], esi
jne 0x407028
push 0x415d59
call sub.WSOCK32.dll_gethostbyname
test eax, eax
je 0x407028
movsx ecx, word [eax + 0xa]
mov eax, dword [eax + 0xc]
mov edx, ecx
push edi
lea edi, [esp + 8]
mov esi, dword [eax]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 8]
pop edi
cmp esi, 0xffffffff
mov dword [esp + 0xc], esi
jne 0x407043
push str.Host_is_unknown_or_invalid
call fcn.00405dc0
add esp, 4
pop esi
add esp, 0x14
ret
mov eax, dword [0x416261]
test eax, eax
jne 0x407051
mov eax, 0x45
push eax
call sub.WSOCK32.dll_htons
mov ecx, dword [0x416265]
mov edx, dword [0x41626d]
mov word [esp + 0xa], ax
lea eax, [esp + 8]
push 0x10
push eax
push 0
push ecx
push 0x415e59
push edx
call sub.WSOCK32.dll_sendto
cmp eax, 0xffffffff
jne 0x4070a0
call fcn.004031a0
push eax
call sub.WSOCK32.dll_WSAGetLastError
push eax
push str.can_not_send_data_packet._nError_code__d___s_
call fcn.00405dc0
add esp, 0xc
pop esi
add esp, 0x14
ret
mov eax, 1
pop esi
add esp, 0x14
ret
call fcn.004031a0
push eax
call sub.WSOCK32.dll_WSAGetLastError
push eax
push str.Cant_create_client_socket._nError_code__d___s_
call fcn.00405dc0
add esp, 0xc
pop esi
add esp, 0x14
ret