Function at 0x4127b0
Capabilities:
Create thread
Print debug messages

Disassembly:
sub esp, 0x11c
mov eax, dword [0x4382c4]
xor eax, esp
mov dword [esp + 0x118], eax
push ebx
mov ebx, dword [esp + 0x128]
push ebp
mov ebp, dword [esp + 0x128]
push esi
push edi
push 0x103
lea eax, [esp + 0x21]
mov esi, ecx
mov edi, edx
push 0
push eax
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], edi
mov byte [esp + 0x28], 0
call fcn.00420f50
add esp, 0xc
test esi, esi
je 0x412a7f
test edi, edi
je 0x412a7f
test ebx, ebx
je 0x412a7f
push 0x104
lea esi, [ebp + 0x3b8]
push 0
push esi
mov dword [ebp + 0x4c0], 0
call fcn.00420f50
add esp, 0xc
push 0x42cfc8
push ebx
call fcn.0041c810
add esp, 8
test eax, eax
jne 0x412895
push 0x431f70
push ebx
call fcn.0041c810
add esp, 8
test eax, eax
jne 0x412895
lea edi, [esp + 0x1c]
call fcn.00413aa0
mov ecx, edi
push ecx
push 0x104
push esi
call fcn.0041af88
add esp, 0xc
push str.Temp_
push 0x104
push esi
call fcn.0041af88
add esp, 0xc
push ebx
push 0x104
push esi
call fcn.0041af88
add esp, 0xc
jmp 0x4128a6
push 0xffffffffffffffff
push ebx
push 0x104
push esi
call fcn.0041c3aa
add esp, 0x10
push 0x310
xor ebx, ebx
lea edi, [ebp + 8]
push ebx
push edi
mov dword [ebp + 0x31c], 1
call fcn.00420f50
mov eax, dword [esp + 0x20]
mov esi, eax
mov ecx, 0xc4
rep movsd dword es:[edi], dword [esi]
mov edx, dword [eax + 8]
mov eax, dword [esp + 0x24]
add esp, 0xc
push eax
push str.start_to_download__s
mov ecx, 0x43b48c
mov dword [ebp + 0x10], edx
mov dword [ebp + 0x318], eax
call fcn.0040a090
add esp, 8
mov esi, ebp
call fcn.00412ad0
cmp eax, 0xffffffff
jne 0x41297f
mov eax, dword [ebp + 0x3b4]
cmp eax, ebx
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
je 0x412919
push eax
call esi
mov dword [ebp + 0x3b4], ebx
mov eax, dword [ebp + 0x3b0]
cmp eax, ebx
je 0x41292c
push eax
call esi
mov dword [ebp + 0x3b0], ebx
mov eax, dword [ebp + 0x3ac]
cmp eax, ebx
je 0x41293f
push eax
call esi
mov dword [ebp + 0x3ac], ebx
mov dword [ebp + 0x31c], ebx
mov ebp, dword [ebp + 0x4bc]
cmp ebp, 0x540
je 0x412968
mov eax, dword [esp + 0x14]
mov ecx, dword [0x43af78]
push eax
push 0xffffffffffffffff
push ebp
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
push str.Connect_to_gateway_failed
mov ecx, 0x43b48c
call fcn.0040a090
add esp, 4
jmp 0x412aa8
cmp eax, 0x197
jne 0x412a2b
cmp dword [ebp + 0x4bc], 0x540
mov dword [ebp + 0x31c], ebx
je 0x412aa8
movzx eax, word [ebp + 0x3a8]
test al, 2
mov edx, dword [ebp + 0x10]
mov dword [0x43b348], edx
je 0x4129ce
mov eax, dword [0x43af78]
push 2
push 2
push 0x101f
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
jmp 0x412aa8
test al, 1
je 0x4129d6
push 1
jmp 0x412a15
test al, 4
je 0x4129f5
mov edx, dword [0x43af78]
push 4
push 2
push 0x101f
push edx
call dword [sym.imp.USER32.dll_PostMessageA]
jmp 0x412aa8
test al, 8
je 0x412a13
mov eax, dword [0x43af78]
push 8
push 2
push 0x101f
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
jmp 0x412aa8
push 0x10
mov ecx, dword [0x43af78]
push 2
push 0x101f
push ecx
call dword [sym.imp.USER32.dll_PostMessageA]
jmp 0x412aa8
cmp dword [ebp + 0x4bc], 0x541
jne 0x412a53
push str.Process_logout.
mov ecx, 0x43b48c
mov dword [ebp + 0x31c], ebx
call fcn.0040a090
add esp, 4
xor eax, eax
jmp 0x412aab
push str.Connect_to_gateway_success
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push ebp
push ebx
push ebp
push 0x4134e0
push ebx
push ebx
mov dword [ebp + 0x320], 1
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp + 4], eax
xor eax, eax
jmp 0x412aab
mov eax, dword [ebp + 0x4bc]
cmp eax, 0x540
je 0x412a9e
mov edx, dword [0x43af78]
push 0
push 0xffffffffffffffff
push eax
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
mov dword [ebp + 0x31c], 0
or eax, 0xffffffff
mov ecx, dword [esp + 0x128]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0041aec3
add esp, 0x11c
ret 8