Function at 0x4038d0
Capabilities:
Create thread

Disassembly:
push ebx
push ebp
mov ebp, dword [esp + 0x10]
mov ebx, 3
push esi
push edi
mov eax, dword [ebp + 0xc]
cmp eax, ebx
jne 0x403923
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x4038f9
call sub.REDCOMM.dll_Ordinal_106
cmp dword [ebp + 0x14], eax
jne case.0x403987.3
mov eax, dword [0x41d230]
test eax, eax
je case.0x403987.3
mov ecx, dword [ebp + 0x10]
mov edx, dword [esp + 0x20]
push ecx
mov ecx, dword [edx + 4]
push ecx
push 0x402
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
pop edi
pop esi
pop ebp
pop ebx
ret
mov esi, dword [esp + 0x20]
mov edx, dword [0x41d224]
mov ecx, dword [esi + 4]
cmp edx, ecx
je 0x40396e
mov edx, dword [0x41d22c]
test edx, edx
je case.0x403987.3
test eax, eax
jne case.0x403987.3
mov dx, word [ebp + 2]
mov eax, dword [0x41d168]
push 7
push edx
push ecx
mov ecx, dword [esp + 0x20]
push 0x41d16c
push eax
push 0x4d
push ecx
call sub.REDCOMM.dll_Ordinal_168
pop edi
pop esi
pop ebp
pop ebx
ret
push 0x41d228
call fcn.0040e6ee
mov eax, dword [ebp + 0xc]
add esp, 4
cmp eax, 4
ja case.0x403987.3
jmp dword [eax*4 + 0x403d70]
mov eax, dword [0x41d27c]
xor edi, edi
cmp eax, edi
je 0x4039a8
push eax
call fcn.0040e677
add esp, 4
mov dword [0x41d27c], edi
call sub.REDCOMM.dll_Ordinal_106
cmp dword [esi + 4], eax
je 0x403a5e
mov edx, dword [ebp + 0x14]
push edx
call fcn.0040e5b5
add esp, 4
cmp eax, edi
mov dword [0x41d27c], eax
je 0x403a23
mov eax, dword [ebp + 0x14]
add ebp, 0x20
mov dword [0x41c35c], eax
mov ecx, dword [ebp - 8]
mov dword [0x41c1a8], ecx
mov edx, dword [ebp - 4]
xor eax, eax
mov dword [0x41d194], edx
mov dword [0x41d1a8], edi
mov ax, word [ebp - 0x1e]
mov dword [0x41c1ec], eax
mov ecx, dword [ebp - 0x18]
push ebp
push 0x41c23c
mov dword [0x41c1f4], ecx
mov dword [0x41c238], 1
mov dword [0x41c22c], edi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, dword [0x41d168]
mov dword [0x41c238], edi
mov dword [0x41c22c], 0x3e8
mov dx, word [ebp + 2]
mov eax, dword [esi + 4]
push 0x3e8
push edx
mov edx, dword [esp + 0x1c]
push eax
push 0x41d16c
push ecx
push 0x4d
push edx
call sub.REDCOMM.dll_Ordinal_168
pop edi
pop esi
pop ebp
pop ebx
ret
mov edx, dword [0x41d168]
mov dword [0x41c22c], 1
mov dword [0x41c238], edi
mov ax, word [ebp + 2]
mov ecx, dword [esi + 4]
push 1
push eax
mov eax, dword [esp + 0x1c]
push ecx
push 0x41d16c
push edx
push 0x4d
push eax
call sub.REDCOMM.dll_Ordinal_168
pop edi
pop esi
pop ebp
pop ebx
ret
mov eax, dword [0x41c238]
xor edi, edi
cmp eax, edi
je 0x403b39
mov edx, dword [0x41d27c]
cmp edx, edi
je case.0x403987.3
mov eax, dword [0x41c1ec]
xor ecx, ecx
mov cx, word [ebp + 2]
cmp eax, ecx
jne 0x403b0c
mov eax, dword [ebp + 8]
mov ecx, dword [0x41c1f4]
dec eax
cmp ecx, eax
jne 0x403b0c
mov eax, dword [ebp + 4]
mov edi, dword [0x41d1a8]
sub eax, 0x14
add edi, edx
mov ecx, eax
lea esi, [ebp + 0x14]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [0x41d1a8]
pop edi
add ecx, eax
pop esi
mov dword [0x41d1a8], ecx
mov eax, dword [ebp + 8]
pop ebp
mov dword [0x41c1f4], eax
pop ebx
ret
mov eax, dword [0x41d168]
mov dword [0x41c238], edi
mov dword [0x41c22c], ebx
mov cx, word [ebp + 2]
mov edx, dword [esi + 4]
push ebx
push ecx
mov ecx, dword [esp + 0x1c]
push edx
push 0x41d16c
push eax
push 0x4d
push ecx
call sub.REDCOMM.dll_Ordinal_168
mov eax, dword [0x41d27c]
cmp eax, edi
je case.0x403987.3
push eax
call fcn.0040e677
add esp, 4
mov dword [0x41d27c], edi
pop edi
pop esi
pop ebp
pop ebx
ret
mov eax, dword [0x41c238]
xor edi, edi
cmp eax, edi
mov eax, dword [0x41d27c]
je 0x403b3e
cmp eax, edi
je case.0x403987.3
mov edx, dword [0x41d1a8]
mov ecx, dword [0x41c35c]
cmp edx, ecx
je 0x403bea
push eax
mov dword [0x41c22c], ebx
mov dword [0x41c238], edi
call fcn.0040e677
push edi
mov dword [0x41d27c], edi
call fcn.0040e6ee
push eax
call fcn.0040e6bf
add esp, 0xc
call fcn.0040e6cc
cdq
mov ecx, 0x7d0
idiv ecx
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [0x41c22c]
mov ax, word [ebp + 2]
mov ecx, dword [esi + 4]
push edx
mov edx, dword [0x41d168]
push eax
mov eax, dword [esp + 0x1c]
push ecx
push 0x41d16c
push edx
push 0x4d
push eax
call sub.REDCOMM.dll_Ordinal_168
pop edi
pop esi
pop ebp
pop ebx
ret
push edi
call fcn.0040e6ee
push eax
call fcn.0040e6bf
add esp, 8
call fcn.0040e6cc
cdq
mov ecx, 0x7d0
idiv ecx
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [0x41c35c]
push edx
call fcn.0040e5b5
mov edi, eax
push 0x74
mov dword [esp + 0x20], edi
call fcn.0040e5b5
add esp, 8
mov ebx, eax
test edi, edi
je 0x403cdb
test ebx, ebx
je 0x403cd8
mov ecx, dword [0x41c35c]
mov esi, dword [0x41d27c]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x1d
mov edi, ebx
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x20]
mov dword [ebx], ecx
mov dx, word [ebp + 2]
mov word [ebx + 0x70], dx
mov ecx, dword [eax + 4]
push ecx
mov ecx, 0x41c1b0
call dword [sym.imp.REDCOMM.dll_public:_struct__HOSTINFO____thiscall_CBaseHostListing::FindNode_unsigned_long_int_]
lea edx, [ebx + 8]
mov dword [ebx + 0x6c], eax
push edx
mov dword [ebx + 4], 0x3e9
call fcn.0040e6ee
mov eax, dword [esp + 0x1c]
mov dword [ebx + 0xc], 0
mov dword [ebx + 0x54], eax
mov ecx, dword [0x41c35c]
add esp, 4
mov dword [ebx + 0x58], ecx
mov edx, dword [0x41c1a8]
lea ecx, [esp + 0x14]
push ecx
push 0
push ebx
mov dword [ebx + 0x5c], edx
mov eax, dword [0x41d194]
push 0x403310
push 0
push 0
mov dword [ebx + 0x60], eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
jmp 0x403d22
push edi
jmp 0x403ce0
test ebx, ebx
je 0x403ce8
push ebx
call fcn.0040e677
add esp, 4
mov ecx, dword [0x41d168]
mov dword [0x41c238], 0
mov dword [0x41c22c], 0x3e8
mov dx, word [ebp + 2]
mov eax, dword [esi + 4]
push 0x3e8
push edx
mov edx, dword [esp + 0x1c]
push eax
push 0x41d16c
push ecx
push 0x4d
push edx
call sub.REDCOMM.dll_Ordinal_168
mov eax, dword [0x41d27c]
push eax
call fcn.0040e677
add esp, 4
mov dword [0x41d27c], 0
pop edi
pop esi
pop ebp
pop ebx
ret
mov eax, dword [0x41d27c]
xor esi, esi
cmp eax, esi
mov dword [0x41c22c], 5
mov dword [0x41c238], esi
je case.0x403987.3
push eax
call fcn.0040e677
add esp, 4
mov dword [0x41d27c], esi
pop edi
pop esi
pop ebp
pop ebx
ret