Function at 0x1045d160
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x200
mov eax, dword [0x10a78b80]
xor eax, esp
mov dword [esp + 0x1fc], eax
mov eax, dword [esp + 0x20c]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x210]
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x214]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x224]
push ebx
mov dword [esp + 8], eax
mov eax, dword [esp + 0x230]
push ebp
mov ebp, dword [esp + 0x20c]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x238]
mov ecx, dword [esp + 0x224]
mov dword [esp + 0x28], eax
lea eax, [ebp + 0x3adc8]
mov ebx, dword [esp + 0x210]
mov edx, dword [esp + 0x220]
mov dword [esp + 0x58], eax
mov eax, dword [ebp + 0x3e7a8]
mov dword [esp + 0x2c], 0
push esi
push edi
cmp byte [eax + 0x4d], 0
lea esi, [ebx + 0xe0]
mov eax, dword [esp + 0x34]
mov edi, dword [esp + 0x230]
sete al
mov dword [esp + 0x20], edi
mov dword [esp + 0x64], ebp
mov dword [esp + 0x48], ebx
lea eax, [eax*2 + 1]
mov dword [esp + 0x18], edx
mov dword [esp + 0x34], eax
push dword [esp + 0x34]
movzx eax, byte [edi + 0x109bf494]
mov edi, closesocket
push dword [esp + 0x24]
shr eax, 1
push ecx
mov dword [esp + 0x48], eax
lea eax, [esp + 0xd0]
push edx
push eax
push ebx
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x88], esi
mov byte [esp + 0x2b], 0
mov dword [esp + 0x8c], edi
mov dword [esp + 0x94], 0xffffffff
mov dword [esp + 0x98], edi
mov dword [esp + 0x9c], 0xffffffff
mov dword [esp + 0xa0], edi
mov dword [esp + 0xa4], 0xffffffff
mov dword [esp + 0xa8], edi
mov byte [esp + 0xac], 0
mov dword [esp + 0x90], 0
call fcn.1009f980
mov ecx, dword [esp + 0x40]
add esp, 0x18
mov eax, dword [ebp + 0x3ea14]
mov ecx, dword [ecx + 0x10]
mov eax, dword [eax + ecx*4]
add eax, dword [esp + 0x24]
mov dword [esi + 0x109c], eax
mov eax, dword [esp + 0x18]
and eax, 0x1f
add eax, 0x10a4
add eax, esi
mov dword [esi + 0x10a0], eax
mov eax, dword [esp + 0x14]
mov byte [eax], 0
mov eax, dword [eax + 8]
test eax, eax
jne 0x1045d320
lea eax, [ebx + 0x24994]
push eax
push dword [esp + 0x24]
push ebp
call fcn.10080be0
mov ecx, dword [esp + 0x20]
add esp, 0xc
mov dword [ecx + 8], eax
test eax, eax
jne 0x1045d329
push str.Failed_to_allocate_PICK_MODE_CONTEXT
push 2
push dword [esi + 0x1ac4]
call fcn.1006e850
add esp, 0xc
jmp 0x1045d329
push eax
call fcn.10081450
add esp, 4
mov eax, dword [esp + 0x14]
push dword [eax + 8]
lea eax, [esp + 0x78]
push dword [esp + 0x24]
push eax
push dword [esp + 0x30]
push dword [esp + 0x28]
push ebx
push dword [esp + 0x40]
push ebp
call fcn.1045ad00
mov eax, dword [esp + 0x50]
push dword [esp + 0x54]
push dword [esp + 0x44]
lea eax, [eax + eax*4]
lea eax, [eax + 0x63d]
lea ecx, [ebx + eax*8]
mov eax, dword [esp + 0x9c]
add eax, dword [ecx]
mov dword [esp + 0x9c], eax
imul dword [ebx + 0x31cc]
mov dword [esp + 0x58], ecx
mov ecx, dword [esp + 0xa8]
mov esi, eax
mov eax, dword [esp + 0xa4]
add esi, 0x100
adc edx, 0
shld ecx, eax, 7
shrd esi, edx, 9
shl eax, 7
sar edx, 9
add esi, eax
mov dword [esp + 0xac], esi
lea eax, [esp + 0xec]
mov esi, dword [esp + 0x4c]
adc edx, ecx
push esi
push dword [esp + 0x44]
mov dword [esp + 0xb8], edx
push eax
push ebx
call fcn.1009f610
mov edx, dword [esp + 0x4c]
add esp, 0x38
cmp dword [ebp + 0x5d090], 2
jl 0x1045d3f5
cmp byte [esp + 0x94], 1
jne 0x1045d3f5
mov eax, dword [edx + 8]
cmp byte [eax + 5], 0x10
jne 0x1045d764
push dword [esp + 0x238]
lea eax, [ebp + 0x3adc8]
push dword [esp + 0x24]
push dword [esp + 0x44]
push esi
push dword [esp + 0x28]
push eax
lea eax, [esp + 0x8c]
push eax
push edx
push ebx
push ebp
call fcn.10457a30
mov cl, al
add esp, 0x28
mov byte [esp + 0x13], cl
test cl, cl
je 0x1045d76d
mov eax, dword [esp + 0x30]
xorps xmm0, xmm0
xor ecx, ecx
movlpd qword [esp + 0x4c], xmm0
mov edx, dword [esp + 0x4c]
movlpd qword [esp + 0x68], xmm0
mov eax, dword [eax + 0xc]
mov esi, dword [esp + 0x6c]
mov edi, dword [esp + 0x68]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x14]
add eax, 0x6c
mov dword [esp + 0x54], ecx
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0x44], eax
mov dword [esp + 0x4c], edx
nop dword [eax]
nop dword [eax + eax]
mov eax, ecx
mov dword [esp + 0x9c], htons
sar eax, 1
mov edx, ecx
imul eax, dword [esp + 0x3c]
and edx, 1
imul edx, dword [esp + 0x3c]
mov dword [esp + 0xa4], 0xffffffff
mov dword [esp + 0xa8], htons
mov dword [esp + 0xac], 0xffffffff
add eax, dword [esp + 0x18]
mov ebx, eax
mov dword [esp + 0xb0], htons
cmp ebx, dword [ebp + 0x3add4]
mov ebx, dword [esp + 0x48]
mov dword [esp + 0xb4], 0xffffffff
mov dword [esp + 0xb8], htons
mov byte [esp + 0xbc], 0
mov dword [esp + 0xa0], 0
mov dword [esp + 0x40], eax
jge 0x1045d6fb
mov ebx, dword [esp + 0x24]
add ebx, edx
cmp ebx, dword [ebp + 0x3add8]
mov dword [esp + 0x30], ebx
mov ebx, dword [esp + 0x48]
jge 0x1045d6fb
mov eax, dword [esp + 0x28]
mov ecx, dword [eax + 0x10]
mov eax, dword [ebp + 0x3ea14]
mov eax, dword [eax + ecx*4]
lea ecx, [ebx + 0xe0]
add eax, dword [esp + 0x24]
add eax, edx
mov dword [ecx + 0x109c], eax
mov eax, dword [esp + 0x40]
and eax, 0x1f
add eax, 0x10a4
add eax, ecx
mov dword [ecx + 0x10a0], eax
mov eax, dword [esp + 0x1c]
mov eax, dword [eax]
mov eax, dword [eax + 8]
test eax, eax
jne 0x1045d5a6
lea eax, [ebx + 0x24994]
push eax
push dword [esp + 0x30]
push ebp
call fcn.10080be0
mov edx, dword [esp + 0x28]
add esp, 0xc
mov ecx, dword [edx]
mov dword [ecx + 8], eax
mov eax, dword [edx]
cmp dword [eax + 8], 0
jne 0x1045d5b3
push str.Failed_to_allocate_PICK_MODE_CONTEXT
push 2
push dword [ebx + 0x1ba4]
call fcn.1006e850
add esp, 0xc
jmp 0x1045d5af
push eax
call fcn.10081450
add esp, 4
mov edx, dword [esp + 0x1c]
mov eax, dword [edx]
mov byte [eax], 0
mov eax, dword [edx]
push dword [eax + 8]
lea eax, [esp + 0xa0]
push dword [esp + 0x30]
push eax
push dword [esp + 0x3c]
push dword [esp + 0x50]
push ebx
push dword [esp + 0x40]
push ebp
call fcn.1045ad00
mov ecx, dword [esp + 0x58]
add esp, 0x20
add ecx, dword [esp + 0x9c]
mov eax, dword [esp + 0x4c]
add eax, dword [esp + 0xa4]
mov edx, dword [esp + 0x44]
adc edx, dword [esp + 0xa8]
mov dword [esp + 0x38], ecx
mov dword [esp + 0x4c], eax
mov dword [esp + 0x44], edx
cmp ecx, 0x7fffffff
jge 0x1045d68a
cmp edx, 0x7fffffff
jg 0x1045d68a
jl 0x1045d623
cmp eax, 0xffffffff
jae 0x1045d68a
cmp esi, 0x7fffffff
jg 0x1045d68a
jl 0x1045d632
cmp edi, 0xffffffff
jae 0x1045d68a
mov ecx, eax
mov esi, edx
mov eax, dword [esp + 0x38]
shld esi, ecx, 7
shl ecx, 7
mov dword [esp + 0x68], esi
test eax, eax
js 0x1045d66b
imul dword [ebx + 0x31cc]
mov edi, eax
mov esi, edx
add edi, 0x100
adc esi, 0
shrd edi, esi, 9
sar esi, 9
add edi, ecx
adc esi, dword [esp + 0x68]
jmp 0x1045d6aa
neg eax
mov edi, ecx
imul dword [ebx + 0x31cc]
add eax, 0x100
adc edx, 0
shrd eax, edx, 9
sar edx, 9
sub edi, eax
sbb esi, edx
jmp 0x1045d6aa
mov dword [esp + 0x38], closesocket
or edi, 0xffffffff
mov dword [esp + 0x4c], 0xffffffff
mov esi, closesocket
mov dword [esp + 0x44], closesocket
cmp dword [esp + 0x88], esi
jl 0x1045d70e
jg 0x1045d6be
cmp dword [esp + 0x84], edi
jb 0x1045d70e
mov ecx, dword [esp + 0x54]
cmp ecx, 3
je 0x1045d6fb
mov eax, dword [esp + 0x1c]
push 0
mov eax, dword [eax]
push dword [eax + 8]
push 0
push dword [esp + 0x38]
push 1
push dword [esp + 0x44]
push dword [esp + 0x58]
push dword [esp + 0x74]
push ebx
push dword [esp + 0x4c]
push ebp
call fcn.104587c0
mov ecx, dword [esp + 0x80]
add esp, 0x2c
add dword [esp + 0x1c], 4
inc ecx
mov dword [esp + 0x54], ecx
cmp ecx, 4
jl 0x1045d480
push dword [esp + 0x34]
mov esi, dword [esp + 0x28]
lea eax, [esp + 0xc8]
push dword [esp + 0x24]
push esi
push dword [esp + 0x24]
push eax
push ebx
call fcn.1009f610
mov eax, dword [esp + 0x50]
add esp, 0x18
imul dword [ebx + 0x31cc]
mov ecx, dword [esp + 0x44]
add eax, 0x100
mov edi, edx
mov edx, dword [esp + 0x4c]
adc edi, 0
shld ecx, edx, 7
shrd eax, edi, 9
shl edx, 7
sar edi, 9
add eax, edx
adc edi, ecx
mov cl, byte [esp + 0x13]
jmp 0x1045d770
mov cl, byte [esp + 0x13]
or eax, 0xffffffff
jmp 0x1045d774
or eax, 0xffffffff
mov edx, dword [esp + 0x14]
cmp dword [esp + 0x88], edi
jg 0x1045d7cd
jl 0x1045d788
cmp dword [esp + 0x84], eax
jae 0x1045d7cd
test cl, cl
je 0x1045d793
mov byte [ebx + 0x1e43e], 0
mov eax, dword [esp + 0x5c]
mov ecx, dword [esp + 0x20]
push 0
mov eax, dword [eax]
mov dword [eax], ecx
push dword [edx + 8]
mov byte [edx], 0
push dword [esp + 0x240]
push ecx
push 0
push esi
push dword [esp + 0x30]
push dword [esp + 0x74]
push ebx
push dword [esp + 0x4c]
push ebp
call fcn.104587c0
add esp, 0x2c
jmp 0x1045d8a7
mov eax, dword [esp + 0x5c]
lea esi, [edx + 0x6c]
mov ecx, dword [esp + 0x2c]
xor edi, edi
mov eax, dword [eax]
mov dword [eax], ecx
mov byte [edx], 3
mov edx, dword [esp + 0x3c]
mov byte [ebx + 0x1e43e], 0
nop dword [eax]
mov ebx, dword [esp + 0x18]
mov eax, edi
shr eax, 1
imul eax, edx
add ebx, eax
mov eax, dword [esp + 0x60]
cmp ebx, dword [eax + 0xc]
jge 0x1045d89a
mov ebp, dword [esp + 0x24]
mov eax, edi
and eax, 1
imul eax, edx
add ebp, eax
mov eax, dword [esp + 0x60]
cmp ebp, dword [eax + 0x10]
jge 0x1045d89a
mov eax, dword [esi]
cmp dword [eax + 8], 0
jne 0x1045d866
mov eax, dword [esp + 0x48]
add eax, 0x24994
push eax
push ecx
push dword [esp + 0x6c]
call fcn.10080be0
mov ecx, dword [esi]
add esp, 0xc
mov dword [ecx + 8], eax
mov eax, dword [esi]
cmp dword [eax + 8], 0
jne 0x1045d866
mov eax, dword [esp + 0x70]
push str.Failed_to_allocate_PICK_MODE_CONTEXT
push 2
push dword [eax + 0x1ac4]
call fcn.1006e850
add esp, 0xc
mov eax, dword [esi]
push 0
push dword [eax + 8]
push 0
push dword [esp + 0x38]
push 0
push ebp
push ebx
push dword [esp + 0x74]
push dword [esp + 0x68]
push dword [esp + 0x4c]
push dword [esp + 0x8c]
call fcn.104587c0
mov ecx, dword [esp + 0x58]
add esp, 0x2c
mov edx, dword [esp + 0x3c]
inc edi
add esi, 4
cmp edi, 4
jl 0x1045d7f0
mov ecx, dword [esp + 0x20c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.105116c0
add esp, 0x200
ret