joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401000
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push ecx
push edi
mov edi, eax
lea eax, [edi + 4]
push eax
call dword [sym.imp.WS2_32.dll_htons]
cmp dword [ebp + 0x10], 0
movzx eax, ax
mov dword [ebp - 4], eax
jne 0x40101f
xor edi, edi
push esi
mov esi, dword [sym.imp.WS2_32.dll_send]
push 0
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp + 8]
call esi
push 0
push 4
lea eax, [ebp + 0xc]
push eax
push dword [ebp + 8]
call esi
pop esi
test edi, edi
jle 0x401056
push 0
push edi
push dword [ebp + 0x10]
push dword [ebp + 8]
call fcn.0040dcfc
add esp, 0x10
pop edi
leave
ret

Function at 0x402063
Capabilities:
Hide graphical window
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x13c
mov eax, dword [0x427484]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, edx
mov ebx, ecx
push edi
mov dword [ebp - 0x13c], ebx
test esi, esi
jne 0x40209e
push 0x93
push str.._guigui_gauges.c
push str.pTftpGui_NULL
call fcn.00410334
add esp, 0xc
cmp dword [esi + 0x88], 1
mov eax, 0x42d01c
je 0x4020b1
mov eax, str.from
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
push eax
push dword [esi + 4]
lea eax, [ebp - 0x138]
push str._s__s
push eax
call edi
add esp, 0x10
push 2
push 0
push 0
mov ecx, 0x133
sub ecx, eax
push ecx
lea eax, [ebp + eax - 0x138]
push eax
push 0x80
lea eax, [esi + 8]
push eax
call dword [sym.imp.WS2_32.dll_getnameinfo]
lea eax, [ebp - 0x138]
push eax
push ebx
mov ebx, dword [sym.imp.USER32.dll_SetWindowTextA]
call ebx
mov esi, dword [esi + 0x9c]
lea eax, [ebp - 0x138]
test esi, esi
je 0x40211f
push esi
push str.File_size_:__d
push eax
call edi
add esp, 0xc
jmp 0x402186
push str.File_size_:_Unknown
push eax
call edi
pop ecx
pop ecx
push 0
push 0x500
push dword [ebp - 0x13c]
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov esi, dword [sym.imp.USER32.dll_GetDialogBaseUnits]
push 0x206
call esi
shr eax, 0x10
imul eax, eax, 0x23
cdq
and edx, 7
add eax, edx
sar eax, 3
push eax
call esi
movzx eax, ax
imul eax, eax, 0x82
cdq
and edx, 3
add eax, edx
sar eax, 2
push eax
xor eax, eax
push eax
push eax
push eax
push dword [ebp - 0x13c]
call dword [sym.imp.USER32.dll_SetWindowPos]
lea eax, [ebp - 0x138]
push eax
push 0x501
push dword [ebp - 0x13c]
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call ebx
push 5
push dword [ebp - 0x13c]
call dword [sym.imp.USER32.dll_ShowWindow]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040ffa3
leave
ret
Function at 0x402491
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [0x427484]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, dword [sym.imp.USER32.dll_GetDlgItem]
push 0xfa8
push eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x30], ecx
call edi
mov esi, dword [sym.imp.USER32.dll_SendMessageA]
xor ebx, ebx
push ebx
push ebx
push 0x14b
push eax
mov dword [ebp - 0x40], eax
call esi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x3c], ebx
cmp eax, ebx
jle 0x402524
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x3c], eax
push 2
push ebx
push ebx
push 0x28
lea eax, [ebp - 0x2c]
push eax
push 0x80
push dword [ebp - 0x34]
call dword [sym.imp.WS2_32.dll_getnameinfo]
lea eax, [ebp - 0x2c]
push eax
push ebx
push 0x143
push dword [ebp - 0x40]
call esi
add dword [ebp - 0x34], 0x84
dec dword [ebp - 0x30]
jne 0x4024e6
cmp dword [ebp + 0xc], 2
mov eax, str.Server_interface
jge 0x402529
mov eax, str.Server_interfaces
push eax
push 0xfa9
push dword [ebp - 0x38]
call dword [sym.imp.USER32.dll_SetDlgItemTextA]
push 1
push 0xfa4
push dword [ebp - 0x38]
call edi
push eax
call dword [sym.imp.USER32.dll_EnableWindow]
push ebx
push ebx
push 0x14e
push dword [ebp - 0x40]
call esi
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x3c]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040ffa3
leave
ret
Function at 0x40362a
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
push edi
push dword [ebp + 0xc]
call fcn.00406e29
mov dword [esp], str._Tftpd32__by_Ph._Jounin_MutEx
push 1
xor esi, esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
push str._kill
push dword [ebp + 0xc]
mov edi, eax
call fcn.00410a40
pop ecx
pop ecx
test eax, eax
jne 0x4036e8
cmp edi, esi
je 0x403675
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x4036e8
push 0x444340
push str.Tftpd32.chm
call fcn.00401059
pop ecx
pop ecx
lea eax, [ebp - 8]
push eax
mov dword [ebp - 4], 1
mov dword [ebp - 8], 8
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
call fcn.00403396
test eax, eax
je 0x4036f3
push dword [ebp + 8]
push esi
push 0x402bb5
push 0x65
push esi
call fcn.0040e100
mov esi, dword [sym.imp.USER32.dll_UnregisterClassA]
add esp, 0x14
push dword [ebp + 8]
push str.TftpAddIpBackGround
call esi
push dword [ebp + 8]
push str.Ttftpd32ClientBackGround
call esi
push edi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
inc eax
jmp 0x4036f5
push dword [ebp + 0xc]
push edi
call fcn.004032fd
pop ecx
pop ecx
xor eax, eax
pop edi
pop esi
leave
ret
Function at 0x404a31
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9c
mov eax, dword [0x427484]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
or dword [ebp - 0x98], 0xffffffff
push esi
push edi
lea ecx, [ebp - 0x94]
push ecx
push eax
call dword [sym.imp.USER32.dll_GetWindowRect]
push dword [ebp - 0x88]
lea eax, [ebp - 0x84]
push dword [ebp - 0x8c]
push dword [ebp - 0x90]
push dword [ebp - 0x94]
push str._d__d__d__d
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x18
lea eax, [ebp - 0x9c]
push eax
lea eax, [ebp - 0x98]
push eax
xor edi, edi
push edi
push 0x20006
push edi
push edi
push edi
push 0x42c24c
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
neg eax
sbb esi, esi
lea eax, [ebp - 0x84]
push eax
inc esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
push eax
lea eax, [ebp - 0x84]
push eax
push 1
push edi
push 0x42c2e0
push dword [ebp - 0x98]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
neg eax
sbb eax, eax
inc eax
and esi, eax
cmp dword [ebp - 0x98], 0xffffffff
je 0x404aff
push dword [ebp - 0x98]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
pop edi
mov eax, esi
xor ecx, ebp
pop esi
call fcn.0040ffa3
leave
ret
Function at 0x404b0f
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa8
mov eax, dword [0x427484]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
or dword [ebp - 0x8c], 0xffffffff
push ebx
push esi
mov dword [ebp - 0x90], eax
lea eax, [ebp - 0x8c]
push eax
push 0x20019
xor ebx, ebx
push ebx
push str.SOFTWARETFTPD32
push reloc.WS2_32.dll_bind
mov dword [ebp - 0x88], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov dword [ebp - 0xa4], eax
lea eax, [ebp - 0xa8]
push eax
lea eax, [ebp - 0x84]
push eax
push ebx
push ebx
push str.LastWindowPos
push dword [ebp - 0x8c]
mov dword [ebp - 0xa8], 0x80
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp dword [ebp - 0x8c], 0xffffffff
je 0x404b9f
push dword [ebp - 0x8c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [ebp - 0x84]
mov byte [ebp - 5], bl
mov esi, ecx
cmp byte [ebp - 0x84], bl
je 0x404c81
push edi
mov edi, dword [ebp - 0x98]
cmp byte [esi], 0x20
jne 0x404c13
mov eax, dword [ebp - 0x88]
inc dword [ebp - 0x88]
sub eax, ebx
mov byte [esi], bl
je 0x404c03
dec eax
je 0x404bf5
dec eax
je 0x404beb
dec eax
jne 0x404c10
push ecx
call fcn.00410b8e
mov dword [ebp - 0x94], eax
jmp 0x404c0f
push ecx
call fcn.00410b8e
mov edi, eax
jmp 0x404c0f
push ecx
call fcn.00410b8e
mov dword [ebp - 0x9c], eax
jmp 0x404c0f
push ecx
call fcn.00410b8e
mov dword [ebp - 0xa0], eax
pop ecx
lea ecx, [esi + 1]
inc esi
cmp byte [esi], bl
jne 0x404bbd
cmp dword [ebp - 0x88], 4
jne 0x404c80
mov esi, dword [sym.imp.USER32.dll_GetSystemMetrics]
push ebx
call esi
mov ecx, dword [ebp - 0xa0]
add ecx, 0x96
cmp ecx, eax
jge 0x404c80
push 1
call esi
mov ecx, dword [ebp - 0x9c]
lea edx, [ecx + 0x96]
cmp edx, eax
jge 0x404c80
mov edx, dword [ebp - 0xa0]
cmp edx, edi
jge 0x404c80
mov eax, dword [ebp - 0x94]
cmp ecx, eax
jge 0x404c80
cmp edx, ebx
jl 0x404c80
cmp ecx, ebx
jl 0x404c80
push 1
sub eax, ecx
push eax
sub edi, edx
push edi
push ecx
push edx
push dword [ebp - 0x90]
call dword [sym.imp.USER32.dll_MoveWindow]
pop edi
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0xa4]
pop esi
xor ecx, ebp
pop ebx
call fcn.0040ffa3
leave
ret
Function at 0x404e7f
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2f0
mov eax, dword [0x427484]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x2ec], edx
mov edx, dword [esi]
push edi
mov edi, dword [sym.imp.USER32.dll_SendMessageA]
xor ecx, ecx
mov dword [ebp - 0x2d0], edx
lea edx, [ebp - 0x2f0]
push edx
push ecx
push 0x1007
push eax
mov dword [ebp - 0x278], eax
mov dword [ebp - 0x2f0], 0xc
mov dword [ebp - 0x2e4], ecx
mov dword [ebp - 0x2e0], ecx
mov dword [ebp - 0x2e8], ecx
call edi
push 0xa
push 0x20
mov dword [ebp - 0x274], eax
lea eax, [ebp - 0x24]
push eax
push 0x28
lea eax, [ebp - 0x4c]
push eax
push 0x80
lea eax, [esi + 8]
push eax
call dword [sym.imp.WS2_32.dll_getnameinfo]
mov ebx, dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x24c]
push str._s:_s
push eax
call ebx
lea eax, [ebp - 0x24c]
push eax
push str.CREATING_item___s__n
call fcn.0040e70d
and dword [ebp - 0x2ac], 0
add esp, 0x18
lea eax, [ebp - 0x24c]
mov dword [ebp - 0x2a0], eax
lea eax, [ebp - 0x2b4]
push eax
push dword [ebp - 0x274]
push 0x102e
push dword [ebp - 0x278]
call edi
lea eax, [esi + 0xa0]
push eax
lea eax, [ebp - 0x270]
push eax
call fcn.0040ffed
push dword [ebp - 0x270]
lea eax, [ebp - 0x24c]
push dword [ebp - 0x26c]
push dword [ebp - 0x268]
push str._02d:_02d:_02d
push eax
call ebx
add esp, 0x1c
lea eax, [ebp - 0x24c]
mov dword [ebp - 0x2a0], eax
lea eax, [ebp - 0x2b4]
push eax
push dword [ebp - 0x274]
mov dword [ebp - 0x2ac], 2
push 0x102e
push dword [ebp - 0x278]
call edi
cmp dword [esi + 0x88], 1
setne al
lea eax, [eax + eax + 0x3c]
movsx eax, al
push eax
push dword [esi + 4]
push eax
lea eax, [ebp - 0x24c]
push str._c_s_c
push eax
call ebx
add esp, 0x14
lea eax, [ebp - 0x24c]
mov dword [ebp - 0x2a0], eax
lea eax, [ebp - 0x2b4]
push eax
push dword [ebp - 0x274]
mov dword [ebp - 0x2ac], 1
push 0x102e
push dword [ebp - 0x278]
call edi
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x274]
pop edi
xor ecx, ebp
pop ebx
call fcn.0040ffa3
leave
ret
Function at 0x4054af
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x170
mov eax, dword [0x427484]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push str.explorer.exe__
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0xfb0
push dword [0x445058]
call dword [sym.imp.USER32.dll_GetDlgItem]
mov esi, dword [sym.imp.USER32.dll_SendMessageA]
xor ebx, ebx
push ebx
push ebx
mov edi, eax
push 0x147
push edi
mov byte [ebp - 0x10a], bl
call esi
mov dword [ebp - 0x11c], eax
cmp eax, 0xffffffff
je 0x405545
push ebx
push eax
push 0x149
push edi
call esi
cmp eax, 0x102
jge 0x405545
lea eax, [ebp - 0x10a]
push eax
push dword [ebp - 0x11c]
push 0x148
push edi
call esi
lea eax, [ebp + eax - 0x10a]
cmp byte [eax - 1], 0x5c
je 0x405545
mov word [eax], 0x5c
push 0x42b8e0
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0x44
pop esi
push esi
lea eax, [ebp - 0x170]
push ebx
push eax
call fcn.00412af0
add esp, 0xc
lea eax, [ebp - 0x12c]
push eax
lea eax, [ebp - 0x170]
push eax
push ebx
push ebx
push 0x20
push ebx
push ebx
push ebx
lea eax, [ebp - 0x118]
push eax
push ebx
mov dword [ebp - 0x170], esi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
push dword [ebp - 0x12c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, eax
call esi
push dword [ebp - 0x128]
call esi
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040ffa3
leave
ret

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x204
mov eax, dword [0x427484]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [sym.imp.WS2_32.dll_htons]
push 5
call esi
push 0
mov word [0x431d59], ax
call esi
push 0
push 4
push 0x431d59
push dword [0x439df4]
mov word [0x431d5b], ax
call dword [sym.imp.WS2_32.dll_send]
call fcn.00405803
lea eax, [ebp + 0xc]
push eax
push dword [ebp + 8]
lea eax, [ebp - 0x204]
push eax
call dword [sym.imp.USER32.dll_wvsprintfA]
push 0x10
push 0x42b374
lea eax, [ebp - 0x204]
push eax
push dword [0x431a44]
call fcn.0040e080
add esp, 0x10
push 0
push 1
push dword [0x431a50]
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
cmp byte [0x431a58], 1
pop esi
jne 0x405999
cmp dword [0x439df0], 0
je 0x405999
push 0x431a59
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ecx, dword [ebp - 4]
xor ecx, ebp
xor eax, eax
call fcn.0040ffa3
leave
ret
Function at 0x405c6a
Capabilities:
Resolve dns
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov eax, dword [0x427484]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
push dword [ebp + 0xc]
push eax
call fcn.00405af8
pop ecx
pop ecx
push 8
xor eax, eax
pop ebx
mov ecx, ebx
lea edi, [ebp - 0x48]
rep stosd dword es:[edi], eax
and dword [ebp - 0x44], eax
mov eax, dword [0x439de8]
mov dword [ebp - 0x40], 2
mov dword [ebp - 0x3c], 0x11
test eax, eax
jne 0x405cc2
push str.tftp
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x405cd8
push eax
lea eax, [ebp - 0x24]
push 0x42b460
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
mov dword [ebp - 0x48], ebx
mov esi, dword [sym.imp.WS2_32.dll_getaddrinfo]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x24]
push eax
mov edi, 0x431c59
push edi
call esi
cmp eax, 0x277c
jne 0x405d0c
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x48]
push eax
push 0x42b464
push edi
mov dword [ebp - 0x48], ebx
call esi
test eax, eax
je 0x405d28
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Host_is_unknown_or_invalid._Error__d
call fcn.004058f3
pop ecx
pop ecx
jmp 0x405dbe
mov eax, dword [ebp - 0x28]
push dword [eax + 0xc]
push dword [eax + 8]
push dword [eax + 4]
call dword [sym.imp.WS2_32.dll_socket]
mov dword [0x439df4], eax
cmp eax, 0xffffffff
jne 0x405d69
push dword [ebp - 0x28]
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
call fcn.0040e9cb
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Cant_create_client_socket._nError_code__d___s_
call fcn.004058f3
add esp, 0xc
jmp 0x405dbe
mov ecx, dword [ebp - 0x28]
push dword [ecx + 0x10]
push dword [ecx + 0x18]
push 0
push dword [0x439dec]
push 0x431d59
push eax
call dword [sym.imp.WS2_32.dll_sendto]
push dword [ebp - 0x28]
cmp eax, 0xffffffff
jne 0x405db5
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
call fcn.0040e9cb
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Tftp_server_may_have_been_stopped
push str.can_not_send_data_packet._n_s_nError_code__d___s_
call fcn.004058f3
add esp, 0x10
jmp 0x405dbe
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
xor eax, eax
inc eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040ffa3
leave
ret
Function at 0x405dcd
Capabilities:
Connect socket
Resolve dns
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x427484]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov dword [ebp - 0x28], 0x435d5f
mov ebx, 0x435d5d
mov edi, 0x200
mov ecx, dword [ebp - 0x28]
cmp byte [ecx], 0
je 0x405f63
mov eax, ecx
sub eax, ebx
mov esi, ecx
add eax, 0xfffffffe
jmp 0x405e0f
cmp byte [esi], 0
je 0x405e13
inc esi
inc eax
cmp eax, edi
jl 0x405e08
inc esi
mov eax, esi
sub eax, ebx
sub eax, 2
cmp eax, edi
je 0x405f75
cmp byte [0x431a58], 1
jne 0x405e92
push str.tsize
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x405e92
push esi
call fcn.00410b8e
pop ecx
push 4
mov dword [0x439e20], eax
call dword [sym.imp.WS2_32.dll_htons]
push 0
mov word [0x431d59], ax
call dword [sym.imp.WS2_32.dll_htons]
push 0
push dword [0x439e08]
mov word [0x431d5b], ax
push 0x659
push dword [0x431a44]
call dword [sym.imp.USER32.dll_SetTimer]
push 0
push 4
push 0x431d59
push dword [0x439df4]
call dword [sym.imp.WS2_32.dll_send]
push str.blksize
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x405eb0
push esi
call fcn.00410b8e
pop ecx
mov dword [0x439e2c], eax
push str.udpport
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x405f48
push 8
push 0x20
lea eax, [ebp - 0x24]
push eax
push 0
push 0
push 0x80
push 0x439d68
call dword [sym.imp.WS2_32.dll_getnameinfo]
push esi
lea eax, [ebp - 0x24]
push eax
push str.Port_value_is__s_should_be_changed_to__s
call fcn.0040e70d
movzx eax, word [0x439d68]
add esp, 0xc
dec eax
dec eax
je 0x405f04
sub eax, 0x15
jne 0x405f18
push esi
call fcn.00410b8e
pop ecx
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [0x439d6a], ax
push 0x80
push 0x439d68
push dword [0x439df4]
call dword [sym.imp.WS2_32.dll_connect]
mov dword [ebp - 0x28], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x28]
push str.re_connect_returns__d___d_
call fcn.0040e70d
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea esi, [eax + esi + 1]
mov dword [ebp - 0x28], esi
sub esi, ebx
sub esi, 2
cmp esi, edi
jl 0x405df1
xor eax, eax
inc eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040ffa3
leave
ret
xor eax, eax
jmp 0x405f66
Function at 0x405f79
Capabilities:
Connect socket
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
xor ebx, ebx
push esi
mov dword [0x439df0], ebx
mov dword [ebp - 8], 0x80
mov esi, 0x439d68
cmp dword [0x439df8], ebx
jne 0x405fba
lea eax, [ebp - 8]
push eax
push esi
push ebx
push 0x4004
push 0x435d5d
push dword [0x439df4]
call dword [sym.imp.WS2_32.dll_recvfrom]
jmp 0x405fd1
push ebx
push 0x4004
push 0x435d5d
push dword [0x439df4]
call dword [sym.imp.WS2_32.dll_recv]
mov dword [ebp - 4], eax
cmp eax, 0xffffffff
jne 0x405fdd
xor eax, eax
jmp 0x40600c
cmp dword [0x439df8], ebx
jne 0x406001
push 0x80
push esi
push dword [0x439df4]
call dword [sym.imp.WS2_32.dll_connect]
mov dword [0x439df8], 1
mov eax, dword [ebp - 4]
mov dword [0x439df0], eax
xor eax, eax
inc eax
pop esi
pop ebx
leave
ret

Function at 0x406010
Capabilities:
Get file size

Disassembly:
movzx eax, byte [0x431a58]
dec eax
push ebx
push esi
push edi
je 0x406082
dec eax
jne 0x406072
xor edi, edi
push edi
push 0x8000020
push 3
push edi
push 1
push bind
mov esi, 0x431a59
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [0x439dfc], eax
cmp eax, 0xffffffff
jne 0x406065
call fcn.0040e9cb
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.Error_opening_file__s_for_reading_nreturn_code_is__d___s_
call fcn.004058f3
add esp, 0x10
jmp 0x40607e
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [0x439e20], eax
xor eax, eax
cmp dword [0x439dfc], 0xffffffff
setne al
pop edi
pop esi
pop ebx
ret
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileA]
xor eax, eax
push eax
push 0x8000020
push 1
push eax
push eax
mov ebx, 0x40000000
push ebx
mov esi, 0x431a59
push esi
call edi
mov dword [0x439dfc], eax
cmp eax, 0xffffffff
jne 0x406072
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x50
jne 0x406072
push 3
push 0x42b5b0
push str.File_exists__overwrite_it__
push dword [0x431a44]
call fcn.0040e080
add esp, 0x10
cmp eax, 6
jne 0x406072
xor eax, eax
push eax
push 0x8000020
push 2
push eax
push eax
push ebx
push esi
call edi
mov dword [0x439dfc], eax
cmp eax, 0xffffffff
jne 0x406072
call fcn.0040e9cb
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.Error_opening_file__s_for_writing_nreturn_code_is__d___s_
jmp 0x40605b
Function at 0x406e29
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
push esi
push 0x1ff
push dword [ebp + 8]
push 0x439ea8
call fcn.00410e80
add esp, 0xc
call fcn.00406dba
xor esi, esi
inc esi
cmp dword [0x442920], esi
jle 0x406eb5
push edi
mov edi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
mov eax, dword [esi*4 + 0x43a0a8]
cmp byte [eax], 0x2d
jne 0x406eab
cmp dword [esi*4 + 0x43a0ac], 0
je 0x406eab
mov al, byte [eax + 1]
cmp al, 0x69
je 0x406e9c
cmp al, 0x6c
je 0x406e8d
cmp al, 0x73
jne 0x406eab
push dword [esi*4 + 0x43a0ac]
inc esi
push str.TFTP_DIR
jmp 0x406ea9
push dword [esi*4 + 0x43a0ac]
inc esi
push str.TFTP_LOG
jmp 0x406ea9
push dword [esi*4 + 0x43a0ac]
inc esi
push str.TFTP_INI
call edi
inc esi
cmp esi, dword [0x442920]
jl 0x406e59
pop edi
mov eax, esi
pop esi
pop ebp
ret

Function at 0x406eba
Capabilities:
Create thread
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x198
mov eax, dword [0x427484]
xor eax, esp
mov dword [esp + 0x194], eax
push esi
mov esi, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 8]
push esi
push str._uninstall
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x406ef3
call fcn.0040a4d3
jmp 0x406f62
lea eax, [esp + 8]
push eax
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x406f2f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x276c
mov eax, str.Error:_Tftpd32_now_requires_winsock_version_2
je 0x406f1b
mov eax, str.Error:_Cant_init_Winsocket
push 0x10
push 0x42b2e0
push eax
push 0
call fcn.0040e080
add esp, 0x10
jmp 0x406f62
push 0
push 0
push 0x40a2f2
call fcn.0041106b
add esp, 0xc
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push esi
push edi
call fcn.0040362a
pop ecx
pop ecx
call dword [sym.imp.WS2_32.dll_WSACleanup]
push str.Thats_all_folks_n
call fcn.0040e70d
pop ecx
mov ecx, dword [esp + 0x19c]
pop edi
pop esi
xor ecx, esp
xor eax, eax
call fcn.0040ffa3
mov esp, ebp
pop ebp
ret 0x10

Function at 0x406f7a
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
xor ebx, ebx
push edi
mov dword [ebp - 4], ebx
xor esi, esi
push ebx
push 0x80
push 4
push ebx
push 1
push 0x40000000
push dword [ebp + 8]
inc esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x406fb8
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp esi, 3
jl 0x406f88
jmp 0x406ff9
push 2
push ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x406ff2
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
lea eax, [ebp - 4]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push edi
call esi
push ebx
lea eax, [ebp - 4]
push eax
push 2
push 0x42b2ac
push edi
call esi
push edi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret