Function at 0x401000
Capabilities:
Set registry value
Set socket configuration

Disassembly:
sub esp, 0x25c
mov eax, dword [esp + 0x260]
push ebx
push ebp
push esi
push edi
push eax
call dword [sym.imp.USER32.dll_GetParent]
mov esi, eax
xor eax, eax
push eax
mov ecx, 0x77
lea edi, [esp + 0x94]
push eax
push 0xbbd
push esi
rep stosd dword es:[edi], eax
call dword [sym.imp.USER32.dll_GetDlgItemInt]
xor ecx, ecx
mov ebx, dword [sym.imp.USER32.dll_GetDlgItemTextA]
test eax, eax
setne cl
lea edx, [esp + 0x18]
mov dword [esp + 0x94], eax
mov ebp, ecx
push 0x77
mov ecx, 0x1e
xor eax, eax
lea edi, [esp + 0x1c]
push edx
push 0xbba
push esi
rep stosd dword es:[edi], eax
call ebx
lea eax, [esp + 0x18]
push eax
call sub.WSOCK32.dll_inet_addr
test ebp, ebp
mov edi, eax
je 0x4010a8
test edi, edi
jne 0x4010a8
push str.Address_Pool
lea ecx, [esp + 0x1c]
push str.Bad_format_for_field__s
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
push 0x30
lea edx, [esp + 0x28]
push str.Tftpd32
push edx
push esi
call fcn.00403120
add esp, 0x1c
mov edx, dword [esp + 0x94]
xor eax, eax
test edx, edx
setne al
mov dword [esp + 0x90], edi
mov ebp, eax
mov ecx, 0x1e
xor eax, eax
lea edi, [esp + 0x18]
push 0x77
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x1c]
push ecx
push 0xbbb
push esi
call ebx
lea edx, [esp + 0x18]
push edx
call sub.WSOCK32.dll_inet_addr
test ebp, ebp
mov edi, eax
je 0x401119
test edi, edi
jne 0x401119
push 0x4122ac
lea eax, [esp + 0x1c]
push str.Bad_format_for_field__s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
push 0x30
lea ecx, [esp + 0x28]
push str.Tftpd32
push ecx
push esi
call fcn.00403120
add esp, 0x1c
lea edx, [esp + 0x18]
mov dword [esp + 0x98], edi
push 0x77
mov ecx, 0x1e
xor eax, eax
lea edi, [esp + 0x1c]
push edx
push 0xbbc
rep stosd dword es:[edi], eax
push esi
call ebx
lea eax, [esp + 0x18]
push eax
call sub.WSOCK32.dll_inet_addr
mov dword [esp + 0x9c], eax
mov ecx, 0x1e
xor eax, eax
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x18]
push 0x77
push ecx
push 0xbc0
push esi
call ebx
lea edx, [esp + 0x18]
push edx
call sub.WSOCK32.dll_inet_addr
mov dword [esp + 0xa0], eax
lea eax, [esp + 0xa4]
push 0xff
push eax
push 0xbbe
push esi
call ebx
lea ecx, [esp + 0x1a4]
push 0x3f
push ecx
push 0xbc1
push esi
call ebx
mov edi, dword [sym.imp.USER32.dll_GetDlgItemInt]
push 0
push 0
push 0xbc2
push esi
call edi
lea edx, [esp + 0x1e8]
push 0x3f
push edx
push 0xbc3
push esi
mov dword [esp + 0x1f4], eax
call ebx
mov eax, dword [esp + 0x90]
test eax, eax
je 0x4014a2
mov eax, dword [esp + 0x98]
test eax, eax
je 0x4014a2
push 0
push 0
push 0xbbd
push esi
call edi
test eax, eax
mov dword [esp + 0x94], eax
jne 0x401222
mov eax, dword [esp + 0x270]
push 0x30
push str.Tftpd32
push str.DHCP_Pool_is_empty_nDHCP_server_will_be_desactivated
push eax
call fcn.00403120
add esp, 0x10
jmp 0x4012b0
cmp dword [0x414fe8], eax
jle 0x40124f
mov esi, dword [esp + 0x270]
push 0x30
push str.Tftpd32
push str.Reducing_DHCP_pool_may_cause_duplicated_addresses
push esi
call fcn.00403120
mov eax, dword [esp + 0xa4]
add esp, 0x10
jmp 0x401256
mov esi, dword [esp + 0x270]
cmp dword [0x415024], eax
je 0x4012b7
mov edx, dword [0x414fe0]
lea ecx, [eax*8]
sub ecx, eax
shl ecx, 2
push ecx
push edx
call fcn.0040a282
add esp, 8
mov dword [0x414fe0], eax
test eax, eax
jne 0x4012b0
mov eax, dword [esp + 0x94]
test eax, eax
je 0x4012b7
push 0x10
push str.Tftpd32
push str.Can_not_allocate_memory
push esi
call fcn.00403120
add esp, 0x10
push 0
push 0
push 0x10
push esi
call dword [sym.imp.USER32.dll_PostMessageA]
mov eax, dword [esp + 0x94]
cmp dword [0x414fe8], eax
jl 0x4012c4
mov dword [0x414fe8], eax
mov ecx, 0x77
lea esi, [esp + 0x90]
mov edi, 0x415020
lea eax, [esp + 0x14]
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x10]
push eax
push ecx
push 0
push 0x20006
push 0
push 0
push 0
push str.SOFTWARETFTPD32DHCP
push reloc.WSOCK32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov edx, dword [esp + 0x10]
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edi, eax
push 4
push 0x415020
push 4
neg edi
push 0
push str.IP_Pool
sbb edi, edi
push edx
inc edi
call esi
test eax, eax
jne 0x40146f
push 4
push 0x415024
push 4
push eax
mov eax, dword [esp + 0x20]
push str.PoolSize
push eax
call esi
test eax, eax
jne 0x40146f
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0x415034
call ebx
mov ecx, dword [esp + 0x10]
inc eax
push eax
push 0x415034
push 1
push 0
push str.BootFile
push ecx
call esi
test eax, eax
jne 0x40146f
mov edx, dword [esp + 0x10]
push 4
push 0x41502c
push 4
push eax
push 0x4121f0
push edx
call esi
test eax, eax
jne 0x40146f
push 4
push 0x415028
push 4
push eax
mov eax, dword [esp + 0x20]
push 0x4122ac
push eax
call esi
test eax, eax
jne 0x40146f
mov ecx, dword [esp + 0x10]
push 4
push 0x415030
push 4
push eax
push str.Gateway
push ecx
call esi
test eax, eax
jne 0x40146f
push 0x415134
call ebx
mov edx, dword [esp + 0x10]
inc eax
push eax
push 0x415134
push 1
push 0
push str.DomainName
push edx
call esi
test eax, eax
jne 0x40146f
push 4
push 0x415174
push 4
push eax
mov eax, dword [esp + 0x20]
push str.AddOptionNumber1
push eax
call esi
test eax, eax
jne 0x40146f
push 0x415178
call ebx
mov ecx, dword [esp + 0x10]
inc eax
push eax
push 0x415178
push 1
push 0
push str.AddOptionValue1
push ecx
call esi
test eax, eax
jne 0x40146f
mov edx, dword [esp + 0x10]
push 4
push 0x4151b8
push 4
push eax
push str.AddOptionNumber2
push edx
call esi
test eax, eax
jne 0x40146f
push 0x4151bc
call ebx
inc eax
push eax
mov eax, dword [esp + 0x14]
push 0x4151bc
push 1
push 0
push str.AddOptionValue2
push eax
call esi
test eax, eax
jne 0x40146f
mov eax, 1
jmp 0x401471
xor eax, eax
mov ecx, dword [esp + 0x10]
and edi, eax
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
jne 0x401495
push 0x30
push str.Tftpd32
push str.Error_during_registry_access
push edi
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x25c
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x25c
ret