Function at 0x412920
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0xb8
mov al, byte [0x4913cd]
push ebx
push ebp
xor ebp, ebp
test al, al
push esi
push edi
mov dword [esp + 0x20], ebp
mov dword [esp + 0x18], ebp
mov dword [esp + 0x14], ebp
mov dword [esp + 0x10], ebp
jne 0x412fbd
push 0x45eb88
call fcn.00440ecc
add esp, 4
test eax, eax
jne 0x412fbd
mov al, byte [0x4913cc]
test al, al
jne 0x41298f
mov eax, dword [0x45e8b0]
push 0x242
push eax
push 0x45eb90
call fcn.0040cd30
add esp, 0xc
pop edi
pop esi
pop ebp
mov eax, 0x445c1
pop ebx
add esp, 0xb8
ret
mov esi, dword [esp + 0xcc]
cmp esi, 0x3e8
ja 0x4129c7
mov ecx, dword [0x45e8b0]
push 0x243
push ecx
push 0x45eb9c
call fcn.0040cd30
add esp, 0xc
pop edi
pop esi
pop ebp
mov eax, 0x445c1
pop ebx
add esp, 0xb8
ret
mov eax, dword [esp + 0xd0]
cmp eax, ebp
jg 0x4129fb
mov edx, dword [0x45e8b0]
push 0x244
push edx
push 0x45ebb0
call fcn.0040cd30
add esp, 0xc
pop edi
pop esi
pop ebp
mov eax, 0x445c1
pop ebx
add esp, 0xb8
ret
cmp dword [0x491390], 2
jne 0x412a0d
push eax
call fcn.004138b0
add esp, 4
push esi
call fcn.00415ec0
add esp, 4
test eax, eax
je 0x412a42
mov eax, dword [0x45e8b0]
push 0x24e
push eax
push 0x45ebb8
call fcn.0040ccd0
add esp, 0xc
pop edi
pop esi
pop ebp
mov eax, 0x445c1
pop ebx
add esp, 0xb8
ret
mov eax, dword [0x4913b8]
cmp eax, 1
jne 0x412a50
mov bl, al
jmp 0x412a5d
cmp eax, ebp
mov eax, dword [0x4913b4]
sete bl
dec ebx
and ebx, eax
mov edi, 0x45e8b8
mov ecx, dword [edi]
push ecx
push esi
call fcn.00405e50
add esp, 8
test eax, eax
je 0x412a7f
add edi, 0xc
cmp edi, 0x45e900
jl 0x412a62
jmp 0x412a81
xor bl, bl
lea edx, [esp + 0x20]
push edx
push esi
call fcn.00405790
mov edi, eax
add esp, 8
cmp edi, ebp
je 0x412ab5
mov eax, dword [0x45e8b0]
push 0x25f
push eax
call fcn.0040ce10
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xb8
ret
xor eax, eax
test bl, bl
mov ecx, 0x29
lea edi, [esp + 0x24]
rep stosd dword es:[edi], eax
je 0x412c83
cmp esi, ebp
je 0x412af9
or ecx, 0xffffffff
mov edi, esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 0x8c
jle 0x412af9
mov ecx, dword [0x45e8b0]
push 0x266
push ecx
push 0x45ebdc
call fcn.0040cd30
add esp, 0xc
push 0x8c
lea edx, [esp + 0x30]
push esi
push edx
call fcn.00405810
lea eax, [esp + 0x38]
add esp, 0xc
test eax, eax
je 0x412b24
or ecx, 0xffffffff
xor eax, eax
lea edi, [esp + 0x2c]
repne scasb al, byte es:[edi]
not ecx
dec ecx
jmp 0x412b26
xor ecx, ecx
lea esi, [esp + ecx + 0x30]
push 4
and esi, 0xfffffffc
push 0x491190
push esi
call fcn.00406db0
call fcn.004444e6
mov dword [0x491190], eax
lea ecx, [esp + 0x1c]
push ecx
lea eax, [esp + 0x3c]
lea edx, [esp + 0x28]
sub esi, eax
push edx
add esi, 4
lea ecx, [esp + 0x40]
push esi
push ecx
call fcn.00411b20
mov esi, eax
add esp, 0x1c
cmp esi, ebp
je 0x412b75
push 0x26f
jmp 0x412c1f
mov eax, dword [esp + 0x10]
cmp eax, 0x8c
mov dword [esp + 0x24], ebp
jle 0x412bac
mov eax, dword [0x45e8b0]
push 0x274
push eax
push 0x45ec20
call fcn.0040cd30
add esp, 0xc
pop edi
pop esi
pop ebp
mov eax, 0x445c1
pop ebx
add esp, 0xb8
ret
mov ecx, dword [esp + 0x18]
push eax
push ecx
lea edx, [esp + 0x34]
push edx
call fcn.00406db0
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x24]
add esp, 0xc
cmp eax, ebp
je 0x412bea
mov ecx, dword [0x45e8b0]
push 0x278
push ecx
push 1
push eax
call sym.gateway.exe_gen__mem_free
add esp, 0x10
mov dword [esp + 0x18], ebp
mov edi, dword [esp + 0xd8]
cmp edi, ebp
jle 0x412cce
mov ecx, dword [esp + 0xd4]
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x18]
push eax
push edi
push ecx
call fcn.00411b20
mov esi, eax
add esp, 0x10
cmp esi, ebp
je 0x412c3b
push 0x27d
mov edx, dword [0x45e8b0]
push edx
call fcn.0040ce10
add esp, 8
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0xb8
ret
mov eax, dword [esp + 0x10]
cmp eax, ebp
jg 0x412c7b
mov eax, dword [0x45e8b0]
push 0x280
push eax
push 0x45ec48
call fcn.0040cd30
push edi
push 0x45ec54
push 0x45ec60
call fcn.00408870
add esp, 0x18
pop edi
pop esi
pop ebp
mov eax, 0x445c1
pop ebx
add esp, 0xb8
ret
mov ebp, dword [esp + 0x14]
mov edi, eax
jmp 0x412cd5
cmp esi, ebp
je 0x412cb4
or ecx, 0xffffffff
xor eax, eax
mov edi, esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 0x95
jle 0x412cb4
mov ecx, dword [0x45e8b0]
push 0x287
push ecx
push 0x45ec68
call fcn.0040cd30
add esp, 0xc
push 0x95
lea edx, [esp + 0x28]
push esi
push edx
call fcn.00405810
mov edi, dword [esp + 0xe4]
add esp, 0xc
mov ebp, dword [esp + 0xd4]
mov eax, dword [esp + 0x20]
mov dword [esp + 0xbc], edi
mov dword [esp + 0xc0], eax
call fcn.00410c70
lea ecx, [esp + 0x24]
cmp ecx, 0x3e8
mov dword [esp + 0xc4], eax
ja 0x412d1f
mov edx, dword [0x45e8b0]
push 0x28d
push edx
push 0x45ecb0
call fcn.0040cd30
mov eax, dword [esp + 0xd0]
add esp, 0xc
mov ecx, dword [esp + 0xbc]
mov edx, ecx
shl edx, 0x10
mov esi, ecx
xor ebx, ebx
mov bh, byte [esp + 0xbe]
and esi, 0xff00
add edx, esi
shl edx, 8
shr ecx, 0x18
add edx, ebx
add edx, ecx
mov ecx, dword [esp + 0xc0]
mov dword [esp + 0xbc], edx
mov edx, ecx
mov esi, ecx
shl edx, 0x10
xor ebx, ebx
mov bh, byte [esp + 0xc2]
and esi, 0xff00
add edx, esi
shl edx, 8
shr ecx, 0x18
add edx, ebx
add edx, ecx
mov dword [esp + 0xc0], edx
mov ecx, eax
shl ecx, 0x10
mov edx, eax
and edx, 0xff00
add ecx, edx
xor edx, edx
mov dh, byte [esp + 0xc6]
shl ecx, 8
shr eax, 0x18
add ecx, edx
add ecx, eax
mov eax, dword [esp + 0x24]
test eax, eax
mov dword [esp + 0xc4], ecx
jne 0x412dd7
mov eax, dword [esp + 0x28]
mov ecx, eax
shl ecx, 0x10
mov edx, eax
and edx, 0xff00
add ecx, edx
xor edx, edx
mov dh, byte [esp + 0x2a]
shl ecx, 8
shr eax, 0x18
add ecx, edx
add ecx, eax
mov dword [esp + 0x28], ecx
mov eax, dword [0x45e8b0]
push 0x290
push eax
lea ebx, [edi + 0xa4]
push 1
push ebx
call sym.gateway.exe_gen__mem_malloc
mov esi, eax
add esp, 0x10
cmp esi, 0x3e8
ja 0x412e26
mov ecx, dword [0x45e8b0]
push 0x291
push ecx
push 0x45ecec
call fcn.0040cd30
add esp, 0xc
pop edi
pop esi
pop ebp
mov eax, 0x445c4
pop ebx
add esp, 0xb8
ret
push 0xa4
lea edx, [esp + 0x28]
push edx
push esi
call fcn.00406db0
add esp, 0xc
test edi, edi
jle 0x412e99
cmp ebp, 0x3e8
ja 0x412e88
mov eax, dword [0x45e8b0]
push 0x296
push eax
push 0x45ecf8
call fcn.0040cd30
add esp, 0xc
test esi, esi
je 0x412e78
mov ecx, dword [0x45e8b0]
push 0x296
push ecx
push 1
push esi
call sym.gateway.exe_gen__mem_free
add esp, 0x10
pop edi
pop esi
pop ebp
mov eax, 0x445c1
pop ebx
add esp, 0xb8
ret
push edi
lea edx, [esi + 0xa4]
push ebp
push edx
call fcn.00406db0
add esp, 0xc
mov eax, dword [esp + 0x14]
test eax, eax
je 0x412ec0
mov ecx, dword [0x45e8b0]
push 0x29a
push ecx
push 1
push eax
call sym.gateway.exe_gen__mem_free
add esp, 0x10
mov dword [esp + 0x14], 0
mov al, byte [0x45e918]
test al, al
jne 0x412f07
mov ebp, dword [esp + 0xd0]
lea edx, [esp + 0x1c]
push edx
push 0x8004667e
push ebp
mov dword [esp + 0x28], 1
call sub.WS2_32.dll_ioctlsocket
cmp eax, 0xffffffff
jne 0x412f0e
mov eax, dword [0x45e8b0]
push 0x2a3
push eax
push 0x45ed04
call fcn.0040cdb0
add esp, 0xc
jmp 0x412f0e
mov ebp, dword [esp + 0xd0]
push ebx
push esi
push ebp
call fcn.004091d0
mov edi, eax
mov al, byte [0x45e918]
add esp, 0xc
test al, al
jne 0x412f5a
lea ecx, [esp + 0x1c]
push ecx
push 0x8004667e
push ebp
mov dword [esp + 0x28], 0
call sub.WS2_32.dll_ioctlsocket
cmp eax, 0xffffffff
jne 0x412f5a
mov edx, dword [0x45e8b0]
push 0x2b4
push edx
push 0x45ed1c
call fcn.0040cdb0
add esp, 0xc
cmp edi, 0x1392
jne 0x412f95
push ebp
call fcn.00415000
mov ecx, dword [0x4913bc]
lea eax, [ebp*8]
sub eax, ebp
shl eax, 6
add eax, ecx
mov ecx, dword [eax + 0xd4]
add esp, 4
test ecx, ecx
je 0x412f95
add eax, 0xd8
push eax
push ebp
call ecx
add esp, 8
test esi, esi
je 0x412fb0
mov edx, dword [0x45e8b0]
push 0x2bf
push edx
push 1
push esi
call sym.gateway.exe_gen__mem_free
add esp, 0x10
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xb8
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xb8
ret