Function at 0x4036b0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x934
mov eax, dword [0x5eef00]
xor eax, esp
mov dword [esp + 0x930], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
push 0x3ff
xor ebx, ebx
lea ecx, [esp + 0x335]
push ebx
push ecx
mov dword [esp + 0x2c], eax
mov byte [esp + 0x33c], 0
call fcn.004b3a80
add esp, 0xc
mov dword [esp + 0x14], ebx
mov dword [esp + 0x24], ebx
call fcn.004897f0
mov dword [0x6d814c], ebx
call dword [0x58a044]
push 0x104
lea edx, [esp + 0x734]
push edx
push ebx
mov edi, eax
mov byte [esp + 0x234], bl
call dword [0x58a04c]
lea eax, [esp + 0x730]
push eax
call fcn.004751d0
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x403761
push esi
push 0x5cd6b0
lea ecx, [esp + 0x230]
push 0x104
push ecx
call fcn.004776e0
push esi
call fcn.00477540
add esp, 0x14
lea edx, [esp + 0x98]
push edx
push 0x101
call dword [0x58a360]
push edi
call fcn.004751d0
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x4037a4
push esi
push 0x5cd6b0
lea eax, [esp + 0x338]
push 0x400
push eax
call fcn.004776e0
push esi
call fcn.00477540
add esp, 0x14
push 0x50
lea ecx, [esp + 0x4c]
push ebx
push ecx
call fcn.004b3a80
lea edx, [esp + 0x234]
lea eax, [esp + 0x33c]
add esp, 0xc
mov dword [esp + 0x48], edx
xor esi, esi
lea edx, [eax + 1]
jmp 0x4037d0
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4037d0
sub eax, edx
mov edx, eax
xor eax, eax
mov bl, 0x22
lea edi, [eax + 1]
mov cl, byte [esp + eax + 0x330]
cmp cl, 0x20
je 0x403814
test cl, cl
je 0x403814
cmp cl, bl
jne 0x40382e
add eax, edi
cmp byte [esp + eax + 0x330], bl
je 0x40382e
cmp eax, edx
jae 0x40382e
add eax, edi
cmp byte [esp + eax + 0x330], bl
jne 0x403803
jmp 0x40382e
add esi, edi
cmp esi, 0x14
jae 0x403834
lea ecx, [esp + eax + 0x331]
mov dword [esp + esi*4 + 0x48], ecx
mov byte [esp + eax + 0x330], 0
add eax, edi
cmp eax, edx
jbe 0x4037e4
cmp esi, edi
mov dword [esp + 0x10], esi
jae 0x403840
mov dword [esp + 0x10], edi
mov eax, dword [esp + 0x48]
cmp byte [eax], bl
push eax
je 0x403850
push 0x5cd9fc
jmp 0x403855
push 0x5cd6b0
push 0x2000
push 0x6d8360
call fcn.004776e0
add esp, 0x10
push 0x5c
push 0x6d8360
call fcn.004b34a0
mov esi, eax
xor ebx, ebx
add esp, 8
cmp esi, ebx
je 0x403884
add esi, edi
mov eax, esi
jne 0x403889
mov eax, 0x6d8360
push eax
call fcn.004013b0
add esp, 4
cmp eax, edi
jle 0x40389a
mov dword [esp + 0x14], edi
cmp esi, ebx
je 0x4038a0
mov byte [esi], bl
mov eax, 0x6d8360
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4038a8
sub eax, edx
cmp eax, 0x2000
jae 0x4038db
push str.TwonkyServer.exe
mov edx, 0x2000
sub edx, eax
push 0x5cd6b0
push edx
lea eax, [eax + 0x6d8360]
push eax
call fcn.004776e0
add esp, 0x10
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
xor edx, edx
mov eax, dword [esp + edx*4 + 0x48]
xor ebx, ebx
mov edi, str._nosplash
mov esi, eax
mov ecx, 0xa
repe cmpsb byte [esi], byte es:[edi]
mov ebx, 1
jne 0x403904
mov dword [esp + 0x18], ebx
mov esi, eax
mov edi, str._start
mov ecx, 7
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x403920
mov dword [esp + 0x1c], ebx
mov dword [0x6da37c], ebx
mov esi, dword [esp + 0x10]
add edx, ebx
cmp edx, esi
jbe 0x4038e5
push str.TwonkyServer
call fcn.0047bcf0
add esp, 4
call fcn.0047c250
call fcn.00403eb0
push ebx
lea ecx, [esp + 0x4c]
push ecx
push esi
call fcn.0047c790
add esp, 0xc
push str.tooltipname
call fcn.00488280
mov esi, eax
add esp, 4
push esi
call fcn.004753b0
add esp, 4
test esi, esi
mov edi, eax
je 0x403977
push esi
call fcn.00477540
add esp, 4
test edi, edi
jne 0x403995
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x930]
xor ecx, esp
call fcn.004b2f95
mov esp, ebp
pop ebp
ret 0x10
push edi
push 0x80
push 0x6660c0
call fcn.004b3062
add esp, 0xc
push edi
call fcn.00477540
add esp, 4
cmp dword [esp + 0x14], 0
je 0x403a4f
call fcn.00401340
call fcn.004020b0
test eax, eax
je 0x4039e8
call fcn.00402650
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x930]
xor ecx, esp
call fcn.004b2f95
mov esp, ebp
pop ebp
ret 0x10
call fcn.0048a250
test eax, eax
jne 0x403a0d
call fcn.00401340
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x930]
xor ecx, esp
call fcn.004b2f95
mov esp, ebp
pop ebp
ret 0x10
push eax
call fcn.004753b0
add esp, 4
push 3
push 0
push 0
mov esi, eax
push esi
push 0
push 0
call dword [0x58a25c]
test esi, esi
je 0x403a36
push esi
call fcn.00477540
add esp, 4
mov ecx, dword [esp + 0x93c]
pop edi
pop esi
pop ebx
xor ecx, esp
xor eax, eax
call fcn.004b2f95
mov esp, ebp
pop ebp
ret 0x10
call fcn.004010e0
test eax, eax
mov dword [0x6da364], eax
je 0x403a62
call fcn.00401340
push str.checkforservice
call fcn.00401b80
add esp, 4
push eax
mov dword [0x6da374], eax
call fcn.00401340
add esp, 4
call fcn.00401f60
test eax, eax
jle 0x403acc
mov eax, dword [0x6da374]
test eax, eax
jne 0x403ad1
xor esi, esi
call fcn.00401340
push 0xfa
call fcn.00479d00
add esi, ebx
add esp, 4
cmp esi, 0x78
jg 0x403acc
push str.checkforservice
call fcn.00401b80
add esp, 4
push eax
push esi
mov dword [0x6da374], eax
call fcn.00401340
add esp, 8
test eax, eax
je 0x403a96
jmp 0x403ad1
mov eax, dword [0x6da374]
push eax
call fcn.00401340
add esp, 4
lea edx, [esp + 0x14]
push edx
push ebx
push 0
push str.SoftwareTwonkyAutostart
push 0x80000002
mov dword [esp + 0x24], ebx
mov dword [esp + 0x3c], 4
call dword [0x58a020]
test eax, eax
jne 0x403b2b
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x14]
push ecx
push 0
push 0
push str.value
push edx
call dword [0x58a024]
mov eax, dword [esp + 0x14]
push eax
call dword [0x58a01c]
cmp dword [esp + 0x10], 0
jne 0x403b39
cmp dword [esp + 0x1c], 0
je 0x403b56
cmp dword [0x6da374], 0
push 0x5cd880
jne 0x403b4e
call fcn.00402200
jmp 0x403b53
call fcn.00401b80
add esp, 4
cmp dword [esp + 0x18], 0
jne 0x403bc0
mov edi, dword [esp + 0x20]
push 0
push edi
push 0
call dword [0x58a2fc]
push eax
push 0x12c
push 0x12c
push 0x12c
push 0x12c
push 0x8000000e
push 0x5cd9e8
push str.STATIC
push 0x88
call dword [0x58a28c]
push 0x6c
push edi
mov esi, eax
call dword [0x58a29c]
push eax
push 0
push 0x172
push esi
call dword [0x58a270]
mov ebx, esi
mov dword [esp + 0x24], esi
call fcn.00403610
mov ecx, dword [esp + 0x20]
call fcn.004034b0
cmp dword [esp + 0x18], 0
mov edi, eax
jne 0x403bed
mov ecx, dword [esp + 0x24]
push 0
push 0
push 0x4023f0
mov dword [0x6da36c], ecx
call fcn.004b32aa
add esp, 0xc
mov esi, dword [0x58a2d4]
push 0
push 0
push 0
lea edx, [esp + 0x38]
push edx
call esi
test eax, eax
je 0x403c49
mov ebx, dword [0x58a27c]
lea ebx, [ebx]
mov ecx, dword [0x6da36c]
lea eax, [esp + 0x2c]
push eax
push ecx
call dword [0x58a2ac]
test eax, eax
jne 0x403c38
lea edx, [esp + 0x2c]
push edx
call ebx
lea eax, [esp + 0x2c]
push eax
call dword [0x58a2e8]
push 0
push 0
push 0
lea ecx, [esp + 0x38]
push ecx
call esi
test eax, eax
jne 0x403c10
call fcn.00489b20
test edi, edi
je 0x403c82
push edi
call dword [0x58a274]
push eax
call dword [0x58a2bc]
mov esi, dword [0x58a2d8]
push 0
call esi
push edi
call dword [0x58a2b4]
push 0
call esi
push 0x6661d0
push 2
call dword [0x58a24c]
call fcn.00403420
int3