Function at 0x408470
Capabilities:
Get common file path
Initialize winsock library
Read .ini file
Terminate process

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x444e31
push eax
mov dword fs:[0], esp
sub esp, 0x3a8
push ebx
push ebp
push esi
mov esi, ecx
push edi
push esi
mov dword [0x467ab0], esi
call fcn.00413670
call fcn.0040d0d0
lea eax, [esp + 0x228]
push eax
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
xor ebp, ebp
cmp eax, ebp
je 0x4084d8
mov edx, dword [esi + 0x32c]
push 0x10
lea ecx, [esi + 0x33c]
push ecx
push str.ERROR_Initialize_WinsockDLL.
push edx
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x408ebc
mov ax, word [esp + 0x228]
cmp al, 2
jne 0x408e9b
test ah, ah
jne 0x408e9b
cmp dword [0x467aa8], ebp
je 0x4084ff
mov ecx, esi
call fcn.00402e00
xor eax, eax
mov ebx, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov ecx, 0xc
mov edi, 0x466c9c
rep stosd dword es:[edi], eax
mov ecx, 0xc
mov edi, 0x467948
rep stosd dword es:[edi], eax
mov ecx, 0xc
mov edi, 0x4669fc
rep stosd dword es:[edi], eax
mov ecx, 0xc
mov edi, 0x4678e8
rep stosd dword es:[edi], eax
mov ecx, 0xc
mov edi, 0x466b38
rep stosd dword es:[edi], eax
mov ecx, 0xc
mov edi, 0x466c68
rep stosd dword es:[edi], eax
push 0x4668f8
mov ecx, 0xc
mov edi, 0x466ccc
rep stosd dword es:[edi], eax
push ebp
mov ecx, 0xc
mov edi, 0x467918
rep stosd dword es:[edi], eax
push 0x44c3c0
mov ecx, 0xc
mov edi, 0x466cfc
rep stosd dword es:[edi], eax
push 0x44c3c8
mov dword [esi + 0x328], ebp
call ebx
cmp eax, 0x64
mov dword [esi + 0x2c], eax
jle 0x40859a
mov dword [esi + 0x2c], 0x64
lea eax, [esp + 0x124]
push eax
push 0xe6
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push 0x4668f8
push ebp
push 0x44c3d0
push 0x44c3d4
call ebx
test eax, eax
je 0x4085cf
mov dword [esi + 0x330], 1
jmp 0x4085d5
mov dword [esi + 0x330], ebp
cmp dword [esi + 0x330], ebp
je 0x4085e9
push 0x44c3d8
lea ecx, [esp + 0x18]
push ecx
jmp 0x4085f3
push 0x44c3dc
lea edx, [esp + 0x18]
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
mov edi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
add esp, 8
push 0x4668f8
lea eax, [esp + 0x18]
push eax
push 0x44c3e0
push 0x44c3e4
call edi
push 0x4668f8
push ebp
push 0x44c3e8
push 0x44c3f8
call ebx
push eax
lea ecx, [esp + 0x18]
push 0x44c3fc
push ecx
mov dword [esi + 0x334], eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 0x4668f8
lea edx, [esp + 0x18]
push edx
push str.MONITORFORMAT
push 0x44c410
call edi
mov eax, dword [esi + 0x2c]
xor edi, edi
cmp eax, ebp
jle 0x4086e3
mov ebp, dword [sym.imp.KERNEL32.dll_SleepEx]
lea ebx, [esi + 0x30]
push edi
lea eax, [esp + 0x128]
push eax
lea ecx, [esp + 0x28]
push 0x44c414
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
push 0x2151
call fcn.004394a2
add esp, 0x14
mov dword [esp + 0x10], eax
test eax, eax
mov dword [esp + 0x3c0], 0
je 0x4086be
push edi
push esi
push 0x4668f8
lea edx, [esp + 0x2c]
push edx
mov ecx, eax
call fcn.00428520
jmp 0x4086c0
xor eax, eax
push 1
push 0x3e8
mov dword [esp + 0x3c8], 0xffffffff
mov dword [ebx], eax
call ebp
mov eax, dword [esi + 0x2c]
inc edi
add ebx, 4
cmp edi, eax
jl 0x408670
xor ebp, ebp
push ebp
push ebp
push 0x412fa0
push 0x467aac
mov dword [0x467aac], ebp
call sub.USER32.dll_DdeInitializeA
test eax, eax
je 0x40871a
push 0x2010
push str.DDEML_Server
push str.Initialization_failed.
push ebp
call dword [sym.imp.USER32.dll_MessageBoxA]
push ebp
call fcn.00439b8d
mov dword [esi + 0x1c0], ebp
xor eax, eax
lea ebp, [esi + 0x28c]
mov ecx, 0x14
mov edi, ebp
rep stosd dword es:[edi], eax
lea ebx, [esi + 0x1c4]
push 0x3ec
mov ecx, 0x32
mov edi, ebx
rep stosd dword es:[edi], eax
mov eax, dword [0x467aac]
push str.SV2AGW_Packet_Engine_Server
push eax
call sub.USER32.dll_DdeCreateStringHandleA
push 0x3ec
mov dword [esi + 0x1c0], eax
mov ecx, dword [0x467aac]
push str.SV2AGW_HUMAN
push ecx
call sub.USER32.dll_DdeCreateStringHandleA
push 0x3ec
mov dword [ebx], eax
mov edx, dword [0x467aac]
push str.MONDATA
push edx
call sub.USER32.dll_DdeCreateStringHandleA
push 0x3ec
mov dword [ebp], eax
mov eax, dword [0x467aac]
push str.INFODATA
push eax
call sub.USER32.dll_DdeCreateStringHandleA
push 0x3ec
mov dword [esi + 0x290], eax
mov ecx, dword [0x467aac]
push 0x44c48c
push ecx
call sub.USER32.dll_DdeCreateStringHandleA
push 0x3ec
mov dword [esi + 0x294], eax
mov edx, dword [0x467aac]
push str.HEARD
push edx
call sub.USER32.dll_DdeCreateStringHandleA
push 0x3ec
mov dword [esi + 0x298], eax
mov eax, dword [0x467aac]
push str.USERS
push eax
call sub.USER32.dll_DdeCreateStringHandleA
push 0x3ec
mov dword [esi + 0x29c], eax
mov ecx, dword [0x467aac]
push str.STATUSDATA
push ecx
call sub.USER32.dll_DdeCreateStringHandleA
push 0x3ec
mov dword [esi + 0x2a0], eax
mov edx, dword [0x467aac]
push str.KISSDATA
push edx
call sub.USER32.dll_DdeCreateStringHandleA
mov ecx, dword [esi + 0x1c0]
xor edi, edi
cmp ecx, edi
mov dword [esi + 0x2a4], eax
je 0x408b18
cmp dword [ebx], edi
je 0x408b18
cmp dword [ebp], edi
je 0x408b18
cmp dword [esi + 0x290], edi
je 0x408b18
cmp dword [esi + 0x294], edi
je 0x408b18
cmp dword [esi + 0x298], edi
je 0x408b18
cmp dword [esi + 0x29c], edi
je 0x408b18
cmp dword [esi + 0x2a0], edi
je 0x408b18
cmp eax, edi
je 0x408b18
mov eax, dword [0x467aac]
push 1
push edi
push ecx
push eax
call sub.USER32.dll_DdeNameService
test eax, eax
je 0x408aea
mov ecx, dword [esi + 0x32c]
push edi
push ecx
call dword [sym.imp.USER32.dll_GetSystemMenu]
mov ebx, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push 0x467980
push 0x64
push 0x466a30
push 0x44c4bc
push 0x44c4c8
push 0x44c4d4
mov edi, eax
call ebx
mov ebp, dword [sym.imp.USER32.dll_InsertMenuA]
push 0x466a30
push 0x800
push 0
push 0xf060
push edi
call ebp
push 0x467980
push 0x64
push 0x466a30
push 0x44c4dc
push 0x44c4f4
push 0x44c4fc
call ebx
push 0x466a30
push 0x2000
push 0
push 0xf060
push edi
call ebp
push 0x467980
push 0x64
push 0x466a30
push 0x44c504
push 0x44c518
push 0x44c51c
call ebx
push 0x466a30
push 0x4000
push 0
push 0xf060
push edi
call ebp
push 0x467980
push 0x64
push 0x466a30
push 0x44c524
push 0x44c538
push 0x44c540
call ebx
push 0x466a30
push 0x8000
push 0
push 0xf060
push edi
call ebp
push 0x44c548
push 0
push 0x800
push 0xf060
push edi
call ebp
push 0x467980
push 0x64
push 0x466a30
push 0x44c54c
push 0x44c55c
push 0x44c568
call ebx
push 0x466a30
push 0x400
push 0
push 0xf060
push edi
call ebp
push 0x467980
push 0x64
push 0x466a30
push 0x44c570
push 0x44c584
push 0x44c590
call ebx
push 0x466a30
push 0x200
push 0
push 0xf060
push edi
call ebp
push 0x467980
push 0x64
push 0x466a30
push 0x44c598
push 0x44c5a0
push 0x44c5a8
call ebx
push 0x466a30
push 0x80
push 0
push 0xf060
push edi
call ebp
push 0x467980
push 0xff
push 0x466a30
push 0x44c5b0
push 0x44c5b8
push 0x44c5c0
call ebx
push 0x466a30
push 0x1000
push 0
push 0xf060
push edi
call ebp
push 0x44c5c8
push 0
push 0x800
push 0xf060
push edi
call ebp
push 0x467980
push 0xff
push 0x466a30
push 0x44c5cc
push 0x44c5d4
push 0x44c5dc
call ebx
push 0x466a30
push 0x10
push 0
push 0xf060
push edi
call ebp
mov ebx, dword [sym.imp.USER32.dll_EnableMenuItem]
push 3
push 0xf120
push edi
call ebx
push 3
push 0xf030
push edi
call ebx
push 3
push 0xf030
push edi
call ebx
push 3
push 0xf000
push edi
call ebx
push 3
push 0xf020
push edi
call ebx
xor edi, edi
jmp 0x408b51
push str.DDEML_Registration_failed.
push str.RGISTERF
push 0x44c60c
call fcn.0040d190
mov eax, dword [esi + 0x32c]
add esp, 0xc
push 0x10
lea edx, [esi + 0x33c]
push edx
push 0x466a30
push eax
jmp 0x408b44
push str.DDEML_String_creation_failed.
push str.STRFAIL
push 0x44c63c
call fcn.0040d190
mov edx, dword [esi + 0x32c]
add esp, 0xc
push 0x10
lea ecx, [esi + 0x33c]
push ecx
push 0x466a30
push edx
call dword [sym.imp.USER32.dll_MessageBoxA]
push edi
call dword [sym.imp.USER32.dll_PostQuitMessage]
mov eax, dword [esi + 0x2c]
xor ebx, ebx
cmp eax, edi
mov dword [esi + 0x304], edi
mov dword [esi + 0x300], edi
jle 0x408c95
lea ebp, [esi + 0x30]
lea ecx, [ecx]
mov ecx, dword [ebp]
call fcn.004256c0
mov eax, dword [esi + 0x2c]
inc ebx
add ebp, 4
cmp ebx, eax
jl 0x408b70
cmp eax, edi
jle 0x408c95
mov ebx, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
push 0x4668f8
push edi
push 0x44c644
push 0x44c64c
call ebx
test eax, eax
je 0x408c17
lea eax, [esp + 0x124]
push eax
lea ecx, [esp + 0x24]
push str._s_agwDialup.ini
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
push 0x6c20
call fcn.004394a2
add esp, 0x10
mov dword [esp + 0x10], eax
cmp eax, edi
mov dword [esp + 0x3c0], 1
je 0x408bf8
push 0xff
push esi
push 0x4668f8
lea edx, [esp + 0x2c]
push edx
mov ecx, eax
call fcn.00418c50
jmp 0x408bfa
xor eax, eax
mov ecx, eax
mov dword [esp + 0x3c0], 0xffffffff
mov dword [esi + 0x304], eax
call fcn.004256c0
jmp 0x408c9b
push 0x4668f8
push edi
push 0x44c668
push 0x44c670
call ebx
test eax, eax
je 0x408c9b
lea eax, [esp + 0x124]
push eax
lea ecx, [esp + 0x24]
push str._s_agwtcpip.ini
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
push 0x30dd
call fcn.004394a2
add esp, 0x10
mov dword [esp + 0x10], eax
cmp eax, edi
mov dword [esp + 0x3c0], 2
je 0x408c79
push 0xfe
push esi
lea edx, [esp + 0x28]
push edx
mov ecx, eax
call fcn.0041a130
jmp 0x408c7b
xor eax, eax
mov ecx, eax
mov dword [esp + 0x3c0], 0xffffffff
mov dword [esi + 0x300], eax
call fcn.00419fa0
jmp 0x408c9b
mov ebx, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov eax, dword [esi + 0x32c]
push 0x401ad0
push 0x1d4c0
push 0xc9
push eax
call dword [sym.imp.USER32.dll_SetTimer]
cmp eax, edi
mov dword [esi + 0x1ace], eax
jne 0x408ce9
mov ecx, dword [0x467ab0]
mov eax, dword [esi + 0x32c]
push 0x40
add ecx, 0x33c
push ecx
push 0x466a30
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
push edi
call dword [sym.imp.USER32.dll_PostQuitMessage]
push 0x4668f8
push 1
push 0x44c688
push 0x44c690
mov dword [esi + 0x24], edi
call ebx
test eax, eax
je 0x408d51
push 0x48
call fcn.004394a2
add esp, 4
mov dword [esp + 0x10], eax
cmp eax, edi
mov dword [esp + 0x3c0], 3
je 0x408d3f
mov edx, dword [esi + 0x32c]
push edx
push esi
mov ecx, eax
call fcn.004306d0
mov dword [esp + 0x3c0], 0xffffffff
mov dword [esi + 0x24], eax
jmp 0x408d6b
xor eax, eax
mov dword [esp + 0x3c0], 0xffffffff
mov dword [esi + 0x24], eax
jmp 0x408d6b
push 0x4668f8
push 0x44c6a4
push 0x44c6a8
push 0x44c6b0
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
push 0x4668f8
push edi
push 0x44c6c4
push 0x44c6cc
mov dword [esi + 0x1ad2], edi
call ebx
test eax, eax
je 0x408dc1
push 0x40
call fcn.004394a2
add esp, 4
mov dword [esp + 0x10], eax
cmp eax, edi
mov dword [esp + 0x3c0], 4
je 0x408dae
push esi
mov ecx, eax
call fcn.0040cc30
jmp 0x408db0
xor eax, eax
mov dword [esp + 0x3c0], 0xffffffff
mov dword [esi + 0x1ad2], eax
mov eax, dword [esi + 0x2c]
xor ebp, ebp
test eax, eax
jle 0x408e3c
lea edi, [esi + 0x30]
mov dword [esp + 0x10], edi
jmp 0x408de0
mov edi, dword [esp + 0x10]
jmp 0x408de0
mov eax, dword [edi]
cmp dword [eax + 0x1618], 2
jne 0x408e09
push pe_nt_image_headers32
push ebp
push 3
push 0x44c6d4
push 0x44c6d8
push 0x44c6dc
mov ecx, esi
call fcn.00405130
mov edi, dword [edi]
lea ebx, [edi + 0x148]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push ebx
mov dword [edi + 0x114], 1
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0x10]
mov eax, dword [esi + 0x2c]
inc ebp
add ecx, 4
cmp ebp, eax
mov dword [esp + 0x10], ecx
jl 0x408dd3
mov eax, dword [esi + 0x32c]
push 0x4019f0
push 0x2932e0
push 0xc8
push eax
call dword [sym.imp.USER32.dll_SetTimer]
test eax, eax
mov dword [esi + 0x1aca], eax
jne 0x408e8b
mov ecx, dword [0x467ab0]
mov edx, dword [esi + 0x32c]
push 0x40
add ecx, 0x33c
push ecx
push 0x466a30
push edx
call dword [sym.imp.USER32.dll_MessageBoxA]
push 0
call dword [sym.imp.USER32.dll_PostQuitMessage]
mov ecx, esi
call fcn.004027a0
mov ecx, esi
call fcn.004071c0
jmp 0x408ec3
mov ecx, dword [esi + 0x32c]
push 0x10
lea eax, [esi + 0x33c]
push eax
push str.The_WinsockDll_is_not_Suitable__Need_At_least_Version_2.0
push ecx
call dword [sym.imp.USER32.dll_MessageBoxA]
call dword [sym.imp.WS2_32.dll_WSACleanup]
push ebp
call dword [sym.imp.USER32.dll_PostQuitMessage]
mov ecx, dword [esp + 0x3b8]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x3b4
ret