Function at 0x4000250b
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push ecx
mov eax, 0x1c740
call fcn.40003540
sub esp, eax
call dbg.__main
mov dword [ebp - 0x10], str.This_is_an_embedded_text_resource.
call sym._initializeSubstitutionTable
mov dword [ebp - 0x458], 0
lea edx, [ebp - 0x454]
mov eax, 0
mov ecx, 0xff
mov edi, edx
rep stosd dword es:[edi], eax
mov dword [ebp - 0x19558], 0
lea eax, [ebp - 0x19554]
mov edx, 0x18ffc
mov dword [esp + 8], edx
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._memset
mov dword [ebp - 0x1970c], 0x10
lea eax, [ebp - 0x196e8]
mov dword [esp + 4], eax
mov dword [esp], 0x202
mov eax, dword [sym.imp.WS2_32.dll_WSAStartup]
call eax
sub esp, 8
test eax, eax
je 0x40001c5e
mov dword [esp], str.Failed_to_initialize_Winsock._n
call sym._printf
mov eax, 1
jmp 0x400025aa
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 2
mov eax, dword [sym.imp.WS2_32.dll_socket]
call eax
sub esp, 0xc
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xffffffff
jne 0x40001ca5
mov dword [esp], str.Failed_to_create_server_socket._n
call sym._printf
mov eax, dword [sym.imp.WS2_32.dll_WSACleanup]
call eax
mov eax, 1
jmp 0x400025aa
mov word [ebp - 0x196f8], 2
mov dword [ebp - 0x196f4], 0
mov dword [esp], 0x3039
mov eax, dword [sym.imp.WS2_32.dll_htons]
call eax
sub esp, 4
mov word [ebp - 0x196f6], ax
mov dword [esp + 8], 0x10
lea eax, [ebp - 0x196f8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_bind]
call eax
sub esp, 0xc
cmp eax, 0xffffffff
jne 0x40001d24
mov dword [esp], str.Failed_to_bind_server_socket._n
call sym._printf
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_closesocket]
call eax
sub esp, 4
mov eax, dword [sym.imp.WS2_32.dll_WSACleanup]
call eax
mov eax, 1
jmp 0x400025aa
mov dword [esp + 4], 0x7fffffff
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_listen]
call eax
sub esp, 8
cmp eax, 0xffffffff
jne 0x40001d6e
mov dword [esp], str.Failed_to_listen_on_server_socket._n
call sym._printf
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_closesocket]
call eax
sub esp, 4
mov eax, dword [sym.imp.WS2_32.dll_WSACleanup]
call eax
mov eax, 1
jmp 0x400025aa
mov dword [esp + 4], 0x3039
mov dword [esp], str.Server_is_running_and_listening_on_port__d..._n
call sym._printf
lea eax, [ebp - 0x1970c]
mov dword [esp + 8], eax
lea eax, [ebp - 0x19708]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_accept]
call eax
sub esp, 0xc
mov dword [ebp - 0x18], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x1000
lea eax, [ebp - 0x1a70c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_recv]
call eax
sub esp, 0x10
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0xffffffff
jne 0x40001e09
mov dword [esp], str.Failed_to_accept_client_connection._n
call sym._printf
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_closesocket]
call eax
sub esp, 4
mov eax, dword [sym.imp.WS2_32.dll_WSACleanup]
call eax
mov eax, 1
jmp 0x400025aa
cmp dword [ebp - 0x1c], 0xffffffff
jne 0x40001e30
mov dword [esp], str.Failed_to_receive_data_from_client._n
call sym._printf
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_closesocket]
call eax
sub esp, 4
jmp 0x400025a5
mov dword [ebp - 0xc], 0
jmp 0x40001e65
lea edx, [ebp - 0x1a70c]
mov eax, dword [ebp - 0xc]
add eax, edx
movzx eax, byte [eax]
movzx eax, al
mov dword [esp], eax
call sym._applySubstitution
mov edx, eax
lea ecx, [ebp - 0x1a70c]
mov eax, dword [ebp - 0xc]
add eax, ecx
mov byte [eax], dl
add dword [ebp - 0xc], 1
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x1c]
jl 0x40001e39
cmp dword [ebp - 0x1c], 7
jle 0x40002599
mov eax, dword [str.mysecret]
mov dword [esp + 8], 8
mov dword [esp + 4], eax
lea eax, [ebp - 0x1a70c]
mov dword [esp], eax
call sym._strncmp
test eax, eax
jne 0x40002599
movzx eax, byte [ebp - 0x1a700]
mov byte [ebp - 0x1d], al
movsx eax, byte [ebp - 0x1d]
cmp eax, 0xb
ja case.default.0x40001ebc
mov eax, dword [eax*4 + 0x4000b314]
jmp eax
lea eax, [ebp - 0x1a70c]
add eax, 0x10
mov dword [ebp - 0x4c], eax
call sym._Function5
lea eax, [ebp - 0x1b70c]
mov dword [esp], eax
call sym._strlen
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
lea eax, [ebp - 0x1b70c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_send]
call eax
sub esp, 0x10
cmp eax, 0xffffffff
jne 0x40001f14
mov dword [esp], str.Failed_to_send_response_to_client._n
call sym._printf
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_closesocket]
call eax
sub esp, 4
movzx eax, byte [ebp - 0x1a6fc]
cmp al, 0x73
jne 0x40001feb
movzx eax, byte [ebp - 0x1a6ec]
cmp al, 0x4c
jne 0x40001feb
movzx eax, byte [ebp - 0x1a6eb]
cmp al, 0x30
jne 0x40001feb
movzx eax, byte [ebp - 0x1a6ea]
cmp al, 0x4c
jne 0x40001feb
lea eax, [ebp - 0x1a70c]
add eax, 0x10
mov dword [ebp - 0x50], eax
call sym._Function5
mov eax, dword [ebp - 0x50]
mov dword [esp], eax
call sym._Function7
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x54]
mov dword [esp + 0xc], eax
mov dword [esp + 8], str._010lx
mov dword [esp + 4], 0x1000
lea eax, [ebp - 0x1b70c]
mov dword [esp], eax
call sym._snprintf
lea eax, [ebp - 0x1b70c]
mov dword [esp], eax
call sym._strlen
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
lea eax, [ebp - 0x1b70c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_send]
call eax
sub esp, 0x10
cmp eax, 0xffffffff
jne 0x40002033
mov dword [esp], str.Failed_to_send_response_to_client._n
call sym._printf
jmp 0x40002033
mov dword [ebp - 0x58], str.Nope
mov eax, dword [ebp - 0x58]
mov dword [esp], eax
call sym._strlen
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x58]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_send]
call eax
sub esp, 0x10
cmp eax, 0xffffffff
jne 0x40002034
mov dword [esp], str.Failed_to_send_response_to_client._n
call sym._printf
jmp 0x40002034
nop
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_closesocket]
call eax
sub esp, 4
jmp 0x400025a5
lea eax, [ebp - 0x1a70c]
add eax, 0x10
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call sym._Function8
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], edx
mov eax, dword [ebp - 0x48]
mov edx, dword [ebp - 0x44]
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], edx
mov dword [esp + 8], str._lld
mov dword [esp + 4], 0x1000
lea eax, [ebp - 0x1b70c]
mov dword [esp], eax
call sym._snprintf
lea eax, [ebp - 0x1b70c]
mov dword [esp], eax
call sym._strlen
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
lea eax, [ebp - 0x1b70c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_send]
call eax
sub esp, 0x10
cmp eax, 0xffffffff
jne 0x400020d7
mov dword [esp], str.Failed_to_send_response_to_client._n
call sym._printf
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_closesocket]
call eax
sub esp, 4
jmp 0x400025a5
lea eax, [ebp - 0x1a70c]
add eax, 0x10
mov dword [ebp - 0x3c], eax
call sym._Function1
call sym._Function3
call sym._Function5
mov dword [esp + 8], 0x1000
mov eax, dword [ebp - 0x3c]
mov dword [esp + 4], eax
lea eax, [ebp - 0x1c71c]
mov dword [esp], eax
call sym._strncpy
lea eax, [ebp - 0x1c71c]
mov dword [esp], eax
call sym._Function9
lea eax, [ebp - 0x1c71c]
mov dword [esp], eax
call sym._strlen
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
lea eax, [ebp - 0x1c71c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_send]
call eax
sub esp, 0x10
cmp eax, 0xffffffff
jne 0x40002177
mov dword [esp], str.Failed_to_send_response_to_client._n
call sym._printf
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_closesocket]
call eax
sub esp, 4
jmp 0x40001d82
lea eax, [ebp - 0x1a70c]
add eax, 0x10
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x1a70c]
add eax, 0x14
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x1a6fc]
mov dword [ebp - 0x1b710], eax
mov eax, dword [ebp - 0x1b710]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x34]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call sym._Function10
mov dword [ebp - 0x38], str.Math_operations_performed_and_results_written_to_process_memory.
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call sym._strlen
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x38]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_send]
call eax
sub esp, 0x10
cmp eax, 0xffffffff
jne 0x40002212
mov dword [esp], str.Failed_to_send_response_to_client._n
call sym._printf
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_closesocket]
call eax
sub esp, 4
jmp 0x40001d82
mov eax, dword [ebp - 0x1a6fc]
mov dword [ebp - 0x1b714], eax
call sym._Function2
call sym._Function6
mov eax, dword [ebp - 0x1a707]
mov dword [ebp - 0x1b718], eax
mov edx, dword [ebp - 0x1b714]
mov eax, dword [ebp - 0x1b718]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._Function11
mov dword [ebp - 0x2c], str.Memory_allocated_in_the_process.
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call sym._strlen
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_send]
call eax
sub esp, 0x10
cmp eax, 0xffffffff
jne 0x400022a7
mov dword [esp], str.Failed_to_send_response_to_client._n
call sym._printf
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_closesocket]
call eax
sub esp, 4
jmp 0x40001d82
lea eax, [ebp - 0x1a70c]
add eax, 0x14
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x1a6fc]
mov dword [ebp - 0x1b71c], eax
call sym._Function1
call sym._Function4
cmp dword [ebp - 0x1c], 0x7cf
jg 0x4000234a
cmp dword [ebp - 0x1c], 0x3e8
jle 0x4000234a
mov dword [esp], 0x7d0
call sym._malloc
mov dword [ebp - 0x28], eax
mov dword [esp + 8], 0x7d0
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call sym._memset
mov dword [esp + 8], 0x7d0
mov eax, dword [ebp - 0x24]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call sym._strncpy
mov eax, dword [ebp - 0x1b71c]
cmp dword [ebp - 0x1c], eax
jne 0x4000234a
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call sym._Function12
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_closesocket]
call eax
sub esp, 4
jmp 0x40001d82
call sym._Function5
call sym._Function6
mov dword [esp], str.AAAA
call sym._Function12
lea eax, [ebp - 0x1c71c]
mov dword [esp], eax
call sym._strlen
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
lea eax, [ebp - 0x1c71c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_send]
call eax
sub esp, 0x10
cmp eax, 0xffffffff
jne 0x400023ba
mov dword [esp], str.Failed_to_send_response_to_client._n
call sym._printf
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_closesocket]
call eax
sub esp, 4
jmp 0x40001d82
mov dword [esp], str.BBBB
call sym._Function12
lea eax, [ebp - 0x1c71c]
mov dword [esp], eax
call sym._strlen
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
lea eax, [ebp - 0x1c71c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_send]
call eax
sub esp, 0x10
cmp eax, 0xffffffff
jne 0x40002420
mov dword [esp], str.Failed_to_send_response_to_client._n
call sym._printf
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_closesocket]
call eax
sub esp, 4
jmp 0x40001d82
call sym._Function3
call sym._Function4
mov dword [esp], str.CCCC
call sym._Function12
lea eax, [ebp - 0x1c71c]
mov dword [esp], eax
call sym._strlen
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
lea eax, [ebp - 0x1c71c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_send]
call eax
sub esp, 0x10
cmp eax, 0xffffffff
jne 0x40002490
mov dword [esp], str.Failed_to_send_response_to_client._n
call sym._printf
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_closesocket]
call eax
sub esp, 4
jmp 0x40001d82
mov dword [esp], str.DDDD
call sym._Function12
lea eax, [ebp - 0x1c71c]
mov dword [esp], eax
call sym._strlen
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
lea eax, [ebp - 0x1c71c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_send]
call eax
sub esp, 0x10
cmp eax, 0xffffffff
jne 0x400024f6
mov dword [esp], str.Failed_to_send_response_to_client._n
call sym._printf
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_closesocket]
call eax
sub esp, 4
jmp 0x40001d82
call sym._Function1
call sym._Function2
mov dword [esp], str.EEEE
call sym._Function12
lea eax, [ebp - 0x1c71c]
mov dword [esp], eax
call sym._strlen
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
lea eax, [ebp - 0x1c71c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_send]
call eax
sub esp, 0x10
cmp eax, 0xffffffff
jne 0x40002566
mov dword [esp], str.Failed_to_send_response_to_client._n
call sym._printf
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_closesocket]
call eax
sub esp, 4
jmp 0x40001d82
mov dword [esp], str.Invalid_opcode_received_from_client._n
call sym._printf
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_closesocket]
call eax
sub esp, 4
jmp 0x400025a5
mov dword [esp], str.Security_check_failed._Disconnecting_client._n
call sym._printf
jmp 0x40001d82
lea esp, [ebp - 8]
pop ecx
pop edi
pop ebp
lea esp, [ecx - 4]
ret