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

Disassembly:
sub esp, 0x1dc
push ebx
push ebp
mov ebp, dword [esp + 0x1e8]
push esi
push edi
push ebp
call dword [sym.imp.USER32.dll_GetParent]
mov esi, eax
mov ecx, 0x55
xor eax, eax
lea edi, [esp + 0x98]
rep stosd dword es:[edi], eax
mov ebx, dword [sym.imp.USER32.dll_GetDlgItemTextA]
mov ecx, 0x20
lea edi, [esp + 0x18]
push 0x7f
rep stosd dword es:[edi], eax
lea eax, [esp + 0x1c]
push eax
push 0xbc2
push esi
call ebx
lea ecx, [esp + 0x18]
push ecx
call sub.WSOCK32.dll_inet_addr
mov edi, eax
test edi, edi
jne 0x401084
push str.Address_Pool
lea edx, [esp + 0x1c]
push str.Bad_format_for_field__s
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
push 0x30
lea eax, [esp + 0x28]
push str.Tftpd32
push eax
push esi
call fcn.00402ba0
add esp, 0x1c
mov dword [esp + 0x98], edi
mov ecx, 0x20
xor eax, eax
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x18]
push 0x7f
push ecx
push 0xbc3
push esi
call ebx
lea edx, [esp + 0x18]
push edx
call sub.WSOCK32.dll_inet_addr
mov edi, eax
test edi, edi
jne 0x4010e1
push str.Mask
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.00402ba0
add esp, 0x1c
lea edx, [esp + 0x18]
mov dword [esp + 0xa0], edi
push 0x7f
mov ecx, 0x20
xor eax, eax
lea edi, [esp + 0x1c]
push edx
push 0xbc7
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 + 0xa4], eax
mov ecx, 0x20
xor eax, eax
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x18]
push 0x7f
push ecx
push 0xbcd
push esi
call ebx
lea edx, [esp + 0x18]
push edx
call sub.WSOCK32.dll_inet_addr
mov dword [esp + 0xa8], eax
lea eax, [esp + 0xac]
push 0xff
push eax
push 0xbca
push esi
call ebx
lea ecx, [esp + 0x1ac]
push 0x3f
push ecx
push 0xbd6
push esi
call ebx
push 0
push 0
push 0xbc8
push esi
call dword [sym.imp.USER32.dll_GetDlgItemInt]
test eax, eax
mov dword [esp + 0x9c], eax
jne 0x4011a0
push 0x30
push str.Tftpd32
push str.DHCP_Pool_is_empty_nDHCP_server_will_be_desactivated
push ebp
call fcn.00402ba0
mov eax, dword [esp + 0xac]
add esp, 0x10
mov ecx, dword [esp + 0x98]
test ecx, ecx
je 0x40139d
mov ecx, dword [esp + 0xa0]
test ecx, ecx
je 0x40139d
cmp dword [0x413cb4], eax
jle 0x4011e2
push 0x30
push str.Tftpd32
push str.Reducing_DHCP_pool_may_cause_duplicated_addresses
push ebp
call fcn.00402ba0
mov eax, dword [esp + 0xac]
add esp, 0x10
cmp dword [0x413cf4], eax
je 0x40123a
mov edx, dword [0x413cb0]
shl eax, 5
push eax
push edx
call fcn.00409522
add esp, 8
mov dword [0x413cb0], eax
test eax, eax
mov eax, dword [esp + 0x9c]
jne 0x40123a
test eax, eax
je 0x40123a
push 0x10
push str.Tftpd32
push str.Can_not_allocate_memory
push ebp
call fcn.00402ba0
add esp, 0x10
push 0
push 0
push 0x10
push ebp
call dword [sym.imp.USER32.dll_PostMessageA]
mov eax, dword [esp + 0x9c]
cmp dword [0x413cb4], eax
jl 0x401247
mov dword [0x413cb4], eax
mov ecx, 0x55
lea esi, [esp + 0x98]
mov edi, 0x413cf0
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 0x413cf0
push 4
neg edi
push 0
push str.IP_Pool
sbb edi, edi
push edx
inc edi
call esi
test eax, eax
jne 0x40136a
push 4
push 0x413cf4
push 4
push eax
mov eax, dword [esp + 0x20]
push str.PoolSize
push eax
call esi
test eax, eax
jne 0x40136a
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0x413d04
call ebx
mov ecx, dword [esp + 0x10]
inc eax
push eax
push 0x413d04
push 1
push 0
push str.BootFile
push ecx
call esi
test eax, eax
jne 0x40136a
mov edx, dword [esp + 0x10]
push 4
push 0x413cfc
push 4
push eax
push 0x41119c
push edx
call esi
test eax, eax
jne 0x40136a
push 4
push 0x413cf8
push 4
push eax
mov eax, dword [esp + 0x20]
push str.Mask
push eax
call esi
test eax, eax
jne 0x40136a
mov ecx, dword [esp + 0x10]
push 4
push 0x413d00
push 4
push eax
push str.Gateway
push ecx
call esi
test eax, eax
jne 0x40136a
push 0x413e04
call ebx
mov edx, dword [esp + 0x10]
inc eax
push eax
push 0x413e04
push 1
push 0
push str.DomainName
push edx
call esi
test eax, eax
jne 0x40136a
mov eax, 1
jmp 0x40136c
xor eax, eax
and edi, eax
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
jne 0x401390
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, 0x1dc
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1dc
ret