Function at 0x403240
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x544861
mov eax, dword fs:[0]
push eax
sub esp, 0xae0
mov eax, dword [0x5960c0]
xor eax, esp
mov dword [esp + 0xad8], eax
push ebx
push esi
push edi
mov eax, dword [0x5960c0]
xor eax, esp
push eax
lea eax, [esp + 0xaf0]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 0x14], esi
call fcn.00402aa0
lea eax, [esp + 0x1b]
push eax
call fcn.00406490
lea edi, [esp + 0x20]
call fcn.0040c3a0
xor ebx, ebx
push 0x800
lea ecx, [esp + 0x2e0]
push ebx
push ecx
mov dword [esp + 0xb04], ebx
call fcn.00521f30
add esp, 0xc
lea edx, [esp + 0x2dc]
push edx
mov dword [esp + 0xae0], ebx
call fcn.00405920
cmp eax, ebx
jle 0x4032da
call fcn.00405df0
call fcn.00407460
call fcn.004066f0
mov edx, str.https
mov ecx, str.ibkcn.com
call fcn.00412e70
mov edx, str.http
mov ecx, str.ibkcn.com
call fcn.00412e70
mov edx, str.http
mov ecx, str.ibkcms.com
call fcn.00412e70
mov edx, str.https
mov ecx, str.ibkcms.com
call fcn.00412e70
mov edi, dword [esi]
push 0x18c
push ebx
cmp eax, ebx
jne 0x403357
lea eax, [esp + 0x4c]
push eax
call fcn.00521f30
mov eax, 1
add esp, 0xc
mov dword [esp + 0x1c8], eax
mov dword [esp + 0x1cc], eax
cmp edi, ebx
je 0x403390
lea ecx, [esp + 0x44]
push ecx
jmp 0x40337f
lea edx, [esp + 0x4c]
push edx
call fcn.00521f30
add esp, 0xc
mov dword [esp + 0x1c8], 1
mov dword [esp + 0x1cc], ebx
cmp edi, ebx
je 0x403390
lea eax, [esp + 0x44]
push eax
push 0x8907
push 0x8907
push edi
call dword [sym.imp.USER32.dll_SendMessageA]
call fcn.004065e0
mov edi, dword [esi]
push 0x18c
push ebx
test eax, eax
je 0x4033cf
lea ecx, [esp + 0x4c]
push ecx
call fcn.00521f30
add esp, 0xc
mov dword [esp + 0x1c8], 2
mov dword [esp + 0x1cc], 1
cmp edi, ebx
je 0x403408
lea edx, [esp + 0x44]
push edx
jmp 0x4033f7
lea eax, [esp + 0x4c]
push eax
call fcn.00521f30
add esp, 0xc
mov dword [esp + 0x1c8], 2
mov dword [esp + 0x1cc], ebx
cmp edi, ebx
je 0x403408
lea ecx, [esp + 0x44]
push ecx
push 0x8907
push 0x8907
push edi
call dword [sym.imp.USER32.dll_SendMessageA]
mov ebx, dword [esi]
call fcn.004092b0
mov edx, dword [0x5a02b8]
mov ebx, dword [sym.imp.KERNEL32.dll_SetEvent]
push edx
call ebx
push 0
push 0
push esi
push 0x408950
push 0
push 0
call fcn.0051b7d6
push 0
push 0
push esi
push 0x407e00
push 0
push 0
call fcn.0051b7d6
add esp, 0x30
call fcn.00410340
mov ecx, 0x5a1014
call fcn.004086b0
test eax, eax
je 0x403472
push 0
push 0
push esi
push 0x407b30
push 0
push 0
call fcn.0051b7d6
add esp, 0x18
jmp 0x4034c1
mov edi, dword [esi]
push 0x18c
lea eax, [esp + 0x48]
push 0
push eax
call fcn.00521f30
add esp, 0xc
mov dword [esp + 0x1c8], 6
mov dword [esp + 0x1cc], 1
test edi, edi
je 0x4034b8
lea ecx, [esp + 0x44]
push ecx
push 0x8907
push 0x8907
push edi
call dword [sym.imp.USER32.dll_SendMessageA]
mov edx, dword [0x5a02c4]
push edx
call ebx
push 0x104
lea eax, [esp + 0x1d8]
push 0
push eax
call fcn.00521f30
add esp, 0xc
lea ecx, [esp + 0x1d4]
call fcn.0040c910
lea eax, [esp + 0x1d4]
dec eax
lea esp, [esp]
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x4034f0
mov ecx, dword [str.Options.ini]
mov edx, dword [0x5717a0]
mov dword [eax], ecx
mov ecx, dword [0x5717a4]
mov dword [eax + 4], edx
lea edx, [esp + 0x1d4]
push edx
mov dword [eax + 8], ecx
call fcn.0040d110
test eax, eax
jne 0x403701
sub esp, 0x1c
mov esi, esp
mov ebx, 0xf
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], ebx
mov byte [esi], al
lea edi, [eax + 0xe]
mov eax, str.DisplayVersion
mov dword [esp + 0x40], esp
call fcn.00405480
sub esp, 0x1c
mov esi, esp
mov byte [esp + 0xb30], 1
mov dword [esi + 0x14], ebx
mov dword [esi + 0x10], 0
lea edi, [ebx + 5]
mov eax, str.iBBECtl_for_IBKChina
mov dword [esp + 0x54], esp
mov byte [esi], 0
call fcn.00405480
lea ebx, [esp + 0x60]
mov byte [esp + 0xb30], 0
call fcn.00410430
add esp, 0x38
mov esi, dword [eax + 0x10]
mov ecx, esi
cmp ecx, esi
jae 0x403592
mov edi, 0x10
cmp dword [eax + 0x14], edi
jb 0x4035a0
mov edx, dword [eax]
jmp 0x4035a2
mov edx, eax
xor eax, eax
mov ecx, 0x5722cf
call fcn.00404da0
test eax, eax
jne 0x4035b9
test esi, esi
setne al
test eax, eax
sete bl
mov byte [esp + 0xaf8], 0
cmp dword [esp + 0x3c], edi
jb 0x4035d7
mov eax, dword [esp + 0x28]
push eax
call fcn.0041aff6
add esp, 4
test bl, bl
je 0x4035f7
mov ebx, dword [esp + 0x14]
push 0
push 0
push ebx
push 0x408d00
push 0
push 0
call fcn.0051b7d6
add esp, 0x18
jmp 0x403652
mov ecx, dword [esp + 0x14]
mov esi, dword [ecx]
push 0x18c
lea edx, [esp + 0x48]
push 0
push edx
call fcn.00521f30
add esp, 0xc
mov dword [esp + 0x1c8], 7
mov dword [esp + 0x1cc], 1
test esi, esi
je 0x403641
lea eax, [esp + 0x44]
push eax
push 0x8907
push 0x8907
push esi
call dword [sym.imp.USER32.dll_SendMessageA]
mov ecx, dword [0x5a02cc]
push ecx
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov ebx, dword [esp + 0x14]
mov eax, dword [0x5a1000]
sub esp, 0x1c
mov esi, esp
mov ecx, eax
mov dword [esi + 0x14], 0xf
mov dword [esi + 0x10], 0
mov dword [esp + 0x38], esp
mov byte [esi], 0
lea edi, [ecx + 1]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x403676
sub ecx, edi
mov edi, ecx
call fcn.00405480
call fcn.0040fe90
add esp, 0x1c
test al, al
jne 0x4036aa
push 0
push 0
push ebx
push 0x408f70
push 0
push 0
call fcn.0051b7d6
add esp, 0x18
jmp 0x4036fd
mov esi, dword [ebx]
push 0x18c
lea edx, [esp + 0x48]
push 0
push edx
call fcn.00521f30
add esp, 0xc
mov dword [esp + 0x1c8], 8
mov dword [esp + 0x1cc], 1
test esi, esi
je 0x4036f0
lea eax, [esp + 0x44]
push eax
push 0x8907
push 0x8907
push esi
call dword [sym.imp.USER32.dll_SendMessageA]
mov ecx, dword [0x5a02d0]
push ecx
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov esi, dword [esp + 0x14]
push 0
push 0
push esi
push 0x406ab0
push 0
push 0
call fcn.0051b7d6
mov ecx, dword [esi]
add esp, 0x18
call fcn.00406e20
push 0
push 0
push esi
push 0x4040a0
push 0
push 0
call fcn.0051b7d6
add esp, 0x18
call fcn.00402aa0
mov eax, dword [esp + 0x20]
test eax, eax
je 0x40374a
push eax
call fcn.0051c5c1
add esp, 4
mov ecx, dword [esp + 0xaf0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xad8]
xor ecx, esp
call fcn.0051ac68
mov esp, ebp
pop ebp
ret