joyce8/EMBER2024-capa huggingface dataset:
Function at 0xcd70b0
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.00cd7200
push ebx
mov ebx, esp
push ebx
mov esi, dword [ebx + 8]
mov edi, dword [ebx + 0x10]
cld
mov dl, 0x80
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
mov ebx, 2
add dl, dl
jne 0xcd70d6
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0xcd70c2
add dl, dl
jne 0xcd70e1
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0xcd7134
xor eax, eax
add dl, dl
jne 0xcd70ee
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0xcd71d5
add dl, dl
jne 0xcd70fd
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0xcd7108
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0xcd7113
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0xcd711e
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
je 0xcd712a
push edi
mov eax, eax
sub edi, eax
mov al, byte [edi]
pop edi
mov byte [edi], al
inc edi
mov ebx, 2
jmp 0xcd70cd
mov eax, 1
add dl, dl
jne 0xcd7142
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0xcd714d
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0xcd7139
sub eax, ebx
mov ebx, 1
jne 0xcd7180
mov ecx, 1
add dl, dl
jne 0xcd7166
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0xcd7171
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0xcd715d
push esi
mov esi, edi
sub esi, ebp
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0xcd70cd
dec eax
shl eax, 8
mov al, byte [esi]
inc esi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0xcd7197
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0xcd71a2
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0xcd718e
cmp eax, 0x7d00
jae 0xcd71c5
cmp eax, 0x500
jb 0xcd71c0
inc ecx
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0xcd70cd
cmp eax, 0x7f
ja 0xcd71c8
add ecx, 2
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0xcd70cd
mov al, byte [esi]
inc esi
xor ecx, ecx
shr al, 1
je 0xcd71f6
adc ecx, 2
mov ebp, eax
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
mov ebx, 1
jmp 0xcd70cd
pop ebx
sub edi, dword [ebx + 0x10]
mov eax, edi
pop ebx
ret 0x10
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.0040f798
add esp, 0x10
pop edi
leave
ret

Function at 0x402392
Capabilities:
Hide graphical window
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x13c
mov eax, dword [0x4294a4]
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 0x4023cd
push 0x93
push str.._guigui_gauges.c
push str.pTftpGui_NULL
call fcn.00411f5e
add esp, 0xc
cmp dword [esi + 0x88], 1
mov eax, 0x42f910
je 0x4023e0
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 0x40244e
push esi
push str.File_size_:__d
push eax
call edi
add esp, 0xc
jmp 0x4024b5
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.00411a98
leave
ret
Function at 0x403b31
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.0040747f
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.00411e40
pop ecx
pop ecx
test eax, eax
jne 0x403bef
cmp edi, esi
je 0x403b7c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x403bef
push 0x446c40
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.004038f7
test eax, eax
je 0x403bfa
push dword [ebp + 8]
push esi
push 0x4030d6
push 0x65
push esi
call fcn.0040fb9c
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 0x403bfc
push dword [ebp + 0xc]
push edi
call fcn.0040385e
pop ecx
pop ecx
xor eax, eax
pop edi
pop esi
leave
ret
Function at 0x405042
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9c
mov eax, dword [0x4294a4]
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 0x42eb38
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 0x42eb4c
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 0x405110
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.00411a98
leave
ret
Function at 0x405120
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa8
mov eax, dword [0x4294a4]
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.SOFTWARETFTPD32X
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 0x4051b0
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 0x405292
push edi
mov edi, dword [ebp - 0x98]
cmp byte [esi], 0x20
jne 0x405224
mov eax, dword [ebp - 0x88]
inc dword [ebp - 0x88]
sub eax, ebx
mov byte [esi], bl
je 0x405214
dec eax
je 0x405206
dec eax
je 0x4051fc
dec eax
jne 0x405221
push ecx
call fcn.00412a74
mov dword [ebp - 0x94], eax
jmp 0x405220
push ecx
call fcn.00412a74
mov edi, eax
jmp 0x405220
push ecx
call fcn.00412a74
mov dword [ebp - 0x9c], eax
jmp 0x405220
push ecx
call fcn.00412a74
mov dword [ebp - 0xa0], eax
pop ecx
lea ecx, [esi + 1]
inc esi
cmp byte [esi], bl
jne 0x4051ce
cmp dword [ebp - 0x88], 4
jne 0x405291
mov esi, dword [sym.imp.USER32.dll_GetSystemMetrics]
push ebx
call esi
mov ecx, dword [ebp - 0xa0]
add ecx, 0x96
cmp ecx, eax
jge 0x405291
push 1
call esi
mov ecx, dword [ebp - 0x9c]
lea edx, [ecx + 0x96]
cmp edx, eax
jge 0x405291
mov edx, dword [ebp - 0xa0]
cmp edx, edi
jge 0x405291
mov eax, dword [ebp - 0x94]
cmp ecx, eax
jge 0x405291
cmp edx, ebx
jl 0x405291
cmp ecx, ebx
jl 0x405291
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.00411a98
leave
ret
Function at 0x405490
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2f0
mov eax, dword [0x4294a4]
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.00410209
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.00411add
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.00411a98
leave
ret
Function at 0x405ac0
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x170
mov eax, dword [0x4294a4]
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 [0x447ba0]
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 0x405b56
push ebx
push eax
push 0x149
push edi
call esi
cmp eax, 0x102
jge 0x405b56
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 0x405b56
mov word [eax], 0x5c
push 0x42e000
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.00414720
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.00411a98
leave
ret

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x204
mov eax, dword [0x4294a4]
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 [0x434849], ax
call esi
push 0
push 4
push 0x434849
push dword [0x43c8e4]
mov word [0x43484b], ax
call dword [sym.imp.WS2_32.dll_send]
call fcn.00405e14
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 0x42da64
lea eax, [ebp - 0x204]
push eax
push dword [0x434534]
call fcn.0040fb1c
add esp, 0x10
push 0
push 1
push dword [0x434540]
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
cmp byte [0x434548], 1
pop esi
jne 0x405faa
cmp dword [0x43c8e0], 0
je 0x405faa
push 0x434549
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ecx, dword [ebp - 4]
xor ecx, ebp
xor eax, eax
call fcn.00411a98
leave
ret
Function at 0x40627b
Capabilities:
Resolve dns
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov eax, dword [0x4294a4]
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.00406109
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 [0x43c8d8]
mov dword [ebp - 0x40], 2
mov dword [ebp - 0x3c], 0x11
test eax, eax
jne 0x4062d3
push str.tftp
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x4062e9
push eax
lea eax, [ebp - 0x24]
push 0x42db50
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, 0x434749
push edi
call esi
cmp eax, 0x277c
jne 0x40631d
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x48]
push eax
push 0x42db54
push edi
mov dword [ebp - 0x48], ebx
call esi
test eax, eax
je 0x406339
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Host_is_unknown_or_invalid._Error__d
call fcn.00405f04
pop ecx
pop ecx
jmp 0x4063cf
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 [0x43c8e4], eax
cmp eax, 0xffffffff
jne 0x40637a
push dword [ebp - 0x28]
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
call fcn.004104c7
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Cant_create_client_socket._nError_code__d___s_
call fcn.00405f04
add esp, 0xc
jmp 0x4063cf
mov ecx, dword [ebp - 0x28]
push dword [ecx + 0x10]
push dword [ecx + 0x18]
push 0
push dword [0x43c8dc]
push 0x434849
push eax
call dword [sym.imp.WS2_32.dll_sendto]
push dword [ebp - 0x28]
cmp eax, 0xffffffff
jne 0x4063c6
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
call fcn.004104c7
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.00405f04
add esp, 0x10
jmp 0x4063cf
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.00411a98
leave
ret
Function at 0x4063de
Capabilities:
Connect socket
Resolve dns
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x4294a4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov dword [ebp - 0x28], 0x43884f
mov ebx, 0x43884d
mov edi, 0x200
mov ecx, dword [ebp - 0x28]
cmp byte [ecx], 0
je 0x406574
mov eax, ecx
sub eax, ebx
mov esi, ecx
add eax, 0xfffffffe
jmp 0x406420
cmp byte [esi], 0
je 0x406424
inc esi
inc eax
cmp eax, edi
jl 0x406419
inc esi
mov eax, esi
sub eax, ebx
sub eax, 2
cmp eax, edi
je 0x406586
cmp byte [0x434548], 1
jne 0x4064a3
push str.tsize
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x4064a3
push esi
call fcn.00412a74
pop ecx
push 4
mov dword [0x43c910], eax
call dword [sym.imp.WS2_32.dll_htons]
push 0
mov word [0x434849], ax
call dword [sym.imp.WS2_32.dll_htons]
push 0
push dword [0x43c8f8]
mov word [0x43484b], ax
push 0x659
push dword [0x434534]
call dword [sym.imp.USER32.dll_SetTimer]
push 0
push 4
push 0x434849
push dword [0x43c8e4]
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 0x4064c1
push esi
call fcn.00412a74
pop ecx
mov dword [0x43c91c], eax
push str.udpport
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x406559
push 8
push 0x20
lea eax, [ebp - 0x24]
push eax
push 0
push 0
push 0x80
push 0x43c858
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.00410209
movzx eax, word [0x43c858]
add esp, 0xc
dec eax
dec eax
je 0x406515
sub eax, 0x15
jne 0x406529
push esi
call fcn.00412a74
pop ecx
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [0x43c85a], ax
push 0x80
push 0x43c858
push dword [0x43c8e4]
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.00410209
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 0x406402
xor eax, eax
inc eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00411a98
leave
ret
xor eax, eax
jmp 0x406577
Function at 0x40658a
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 [0x43c8e0], ebx
mov dword [ebp - 8], 0x80
mov esi, 0x43c858
cmp dword [0x43c8e8], ebx
jne 0x4065cb
lea eax, [ebp - 8]
push eax
push esi
push ebx
push 0x4004
push 0x43884d
push dword [0x43c8e4]
call dword [sym.imp.WS2_32.dll_recvfrom]
jmp 0x4065e2
push ebx
push 0x4004
push 0x43884d
push dword [0x43c8e4]
call dword [sym.imp.WS2_32.dll_recv]
mov dword [ebp - 4], eax
cmp eax, 0xffffffff
jne 0x4065ee
xor eax, eax
jmp 0x40661d
cmp dword [0x43c8e8], ebx
jne 0x406612
push 0x80
push esi
push dword [0x43c8e4]
call dword [sym.imp.WS2_32.dll_connect]
mov dword [0x43c8e8], 1
mov eax, dword [ebp - 4]
mov dword [0x43c8e0], eax
xor eax, eax
inc eax
pop esi
pop ebx
leave
ret

Function at 0x406621
Capabilities:
Get file size

Disassembly:
movzx eax, byte [0x434548]
dec eax
push ebx
push esi
push edi
je 0x406693
dec eax
jne 0x406683
xor edi, edi
push edi
push 0x8000020
push 3
push edi
push 1
push bind
mov esi, 0x434549
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [0x43c8ec], eax
cmp eax, 0xffffffff
jne 0x406676
call fcn.004104c7
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.00405f04
add esp, 0x10
jmp 0x40668f
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [0x43c910], eax
xor eax, eax
cmp dword [0x43c8ec], 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, 0x434549
push esi
call edi
mov dword [0x43c8ec], eax
cmp eax, 0xffffffff
jne 0x406683
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x50
jne 0x406683
push 3
push 0x42dca0
push str.File_exists__overwrite_it__
push dword [0x434534]
call fcn.0040fb1c
add esp, 0x10
cmp eax, 6
jne 0x406683
xor eax, eax
push eax
push 0x8000020
push 2
push eax
push eax
push ebx
push esi
call edi
mov dword [0x43c8ec], eax
cmp eax, 0xffffffff
jne 0x406683
call fcn.004104c7
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 0x40666c
Function at 0x40747f
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
push esi
push 0x1ff
push dword [ebp + 8]
push 0x43c998
call fcn.00412c90
add esp, 0xc
call fcn.00407410
xor esi, esi
inc esi
cmp dword [0x44500c], esi
jle 0x40750b
push edi
mov edi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
mov eax, dword [esi*4 + 0x43cb98]
cmp byte [eax], 0x2d
jne 0x407501
cmp dword [esi*4 + 0x43cb9c], 0
je 0x407501
mov al, byte [eax + 1]
cmp al, 0x69
je 0x4074f2
cmp al, 0x6c
je 0x4074e3
cmp al, 0x73
jne 0x407501
push dword [esi*4 + 0x43cb9c]
inc esi
push str.TFTP_DIR
jmp 0x4074ff
push dword [esi*4 + 0x43cb9c]
inc esi
push str.TFTP_LOG
jmp 0x4074ff
push dword [esi*4 + 0x43cb9c]
inc esi
push str.TFTP_INI
call edi
inc esi
cmp esi, dword [0x44500c]
jl 0x4074af
pop edi
mov eax, esi
pop esi
pop ebp
ret

Function at 0x407510
Capabilities:
Create thread
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x198
mov eax, dword [0x4294a4]
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 0x407549
call fcn.0040b65f
jmp 0x4075b0
lea eax, [esp + 8]
push eax
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x407585
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x276c
mov eax, str.Error:_Tftpd32_now_requires_winsock_version_2
je 0x407571
mov eax, str.Error:_Cant_init_Winsocket
push 0x10
push 0x42d9d0
push eax
push 0
call fcn.0040fb1c
add esp, 0x10
jmp 0x4075b0
push 0
push 0
push 0x40b456
call fcn.00412e7b
add esp, 0xc
push esi
push edi
call fcn.00403b31
pop ecx
pop ecx
call dword [sym.imp.WS2_32.dll_WSACleanup]
push str.Thats_all_folks_n
call fcn.00410209
pop ecx
mov ecx, dword [esp + 0x19c]
pop edi
pop esi
xor ecx, esp
xor eax, eax
call fcn.00411a98
mov esp, ebp
pop ebp
ret 0x10

Function at 0x4075c8
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 0x407606
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp esi, 3
jl 0x4075d6
jmp 0x407647
push 2
push ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x407640
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 0x42d99c
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