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

Disassembly:
sub esp, 0x208
mov eax, dword [0x10a78b80]
xor eax, esp
mov dword [esp + 0x204], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [esp + 0x220]
mov edx, dword [esp + 0x21c]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x224]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x228]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x22c]
mov ebx, dword [esp + 0x234]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x248]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x24c]
mov ebp, dword [esp + 0x244]
mov dword [esp + 0x20], eax
lea eax, [edx + 0x3abf0]
mov dword [esp + 0x48], eax
mov dword [esp + 0x24], ebx
movzx ecx, byte [ebp + 0x109bf494]
mov ebx, dword [esp + 0x23c]
mov eax, ecx
shr eax, 1
mov dword [esp + 0x4c], eax
movzx eax, byte [ebp + 0x109bf4ac]
add eax, ebx
mov dword [esp + 0x18], ebx
mov ebx, dword [esp + 0x238]
mov esi, dword [esp + 0x240]
mov edi, dword [esp + 0x230]
cmp eax, dword [ebx + 0xc]
mov ebx, dword [esp + 0x24]
mov dword [esp + 0x28], edx
mov dword [esp + 0x34], edi
mov dword [esp + 0x30], esi
mov dword [esp + 0x14], ebp
jge 0x1045df61
lea eax, [ecx + esi]
mov ecx, dword [esp + 0x238]
cmp eax, dword [ecx + 0x10]
jge 0x1045df61
cmp ebp, 3
jle 0x1045df61
mov al, byte [edx + 0x3abf0]
lea ecx, [edx + 0x3abf0]
test al, al
je 0x1045df61
cmp al, 2
je 0x1045df61
cmp dword [edi + 0x14d10], 2
jle 0x1045df61
push 1
push ecx
call fcn.1045a2f0
mov ecx, dword [edx + 0x3accc]
add esp, 8
mov dword [esp + 0x40], eax
lea eax, [edx + 0x3abf0]
cmp ecx, 0xffffffff
je 0x1045da0d
add eax, 0x10c
shl ecx, 4
add eax, ecx
mov dword [esp + 0x10], eax
lea eax, [edx + 0x3abf0]
jmp 0x1045da15
mov dword [esp + 0x10], 0
mov eax, dword [eax + 0x3bb8]
xor ecx, ecx
push ebp
cmp byte [eax + 0x4d], cl
sete cl
lea ecx, [ecx*2 + 1]
push ecx
push esi
push dword [esp + 0x24]
mov dword [esp + 0x2c], ecx
push dword [edx + 0x3eee0]
push edi
call fcn.1010fb10
mov ebp, dword [esp + 0x34]
push ebp
push dword [esp + 0x2c]
push esi
push dword [esp + 0x3c]
push dword [esp + 0x68]
push 0
push ebx
call fcn.100c5780
mov eax, dword [esp + 0x48]
lea esi, [ebx + 0x18]
mov ebx, dword [esp + 0x5c]
add eax, eax
add esp, 0x34
mov dword [esp + 0x10], 0
mov dword [esp + 0x40], eax
add edi, 0x18
nop word [eax + eax]
mov ecx, dword [esi - 4]
push dword [esi + 0x28]
add ecx, eax
mov eax, dword [esi]
push dword [esi + 0x18]
push dword [edi + 0x10]
lea eax, [eax + ecx*2]
mov ecx, dword [eax*4 + 0x106341d0]
mov eax, dword [ebx]
push dword [edi]
shl ecx, 6
mov eax, dword [ecx + eax + 0xc5cc]
call eax
mov edx, dword [esp + 0x20]
lea edi, [edi + 0x48]
add edx, eax
lea esi, [esi + 0x538]
mov eax, dword [esp + 0x50]
add esp, 0x10
mov dword [esp + 0x10], edx
sub ebp, 1
jne 0x1045da80
mov edi, dword [esp + 0x14]
mov eax, edx
cdq
mov ebx, dword [esp + 0x24]
movzx esi, byte [edi + 0x109bf4dc]
movzx ecx, byte [edi + 0x109bf4c4]
imul esi, ecx
idiv esi
cmp eax, 0x19
jl 0x1045df61
lea eax, [esp + 0x54]
push eax
call fcn.10220540
lea eax, [esp + 0xa8]
push eax
call fcn.10220540
mov esi, dword [esp + 0x20]
lea eax, [esp + 0xd4]
mov ebp, dword [esp + 0x3c]
push 3
push edi
mov edi, dword [esp + 0x40]
push edi
push esi
push eax
push ebp
call fcn.1009f980
mov edx, dword [esp + 0x64]
mov eax, dword [esp + 0x68]
mov ecx, dword [edx + 0x10]
mov eax, dword [eax + 0x3e24]
mov eax, dword [eax + ecx*4]
mov ecx, dword [esp + 0x40]
add eax, edi
mov dword [ebx + 0x109c], eax
mov eax, esi
and eax, 0x1f
add eax, 0x10a4
add eax, ebx
mov dword [ebx + 0x10a0], eax
mov eax, dword [esp + 0x34]
push eax
push edi
push esi
mov esi, dword [esp + 0x54]
push ebp
push edx
push esi
mov byte [ecx], 0
call fcn.10457520
mov eax, dword [esp + 0x58]
add esp, 0x38
mov eax, dword [eax + 8]
test eax, eax
jne 0x1045dbb5
mov eax, dword [esp + 0x38]
add eax, 0x24994
push eax
push dword [esp + 0x18]
push esi
call fcn.10080be0
mov ecx, dword [esp + 0x2c]
add esp, 0xc
mov dword [ecx + 8], eax
test eax, eax
jne 0x1045dbbe
push str.Failed_to_allocate_PICK_MODE_CONTEXT
push 2
push dword [ebx + 0x1ac4]
call fcn.1006e850
add esp, 0xc
jmp 0x1045dbbe
push eax
call fcn.10081450
add esp, 4
mov ebx, dword [esp + 0x20]
lea eax, [esp + 0xa4]
push dword [ebx + 8]
push dword [esp + 0x18]
push eax
push edi
push dword [esp + 0x28]
push ebp
push dword [esp + 0x54]
push esi
call fcn.1045ad00
mov eax, dword [esp + 0x4c]
push 3
lea eax, [eax + eax*4]
lea eax, [eax + 0x63d]
lea ecx, [eax*8]
mov eax, dword [esp + 0xc8]
add eax, dword [ecx + ebp]
add ecx, ebp
mov dword [esp + 0xc8], eax
imul dword [ebp + 0x31cc]
mov dword [esp + 0x50], ecx
mov ecx, dword [esp + 0xd4]
mov esi, eax
mov eax, dword [esp + 0xd0]
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 + 0xd8], esi
lea eax, [esp + 0xf0]
mov esi, dword [esp + 0x38]
adc edx, ecx
push esi
push edi
push dword [esp + 0x44]
mov dword [esp + 0xe8], edx
push eax
push ebp
call fcn.1009f610
push 3
push esi
mov byte [ebx], 3
call fcn.1045a260
add esp, 0x40
mov ebp, eax
lea eax, [esp + 0x54]
mov dword [esp + 0x10], ebp
push eax
call fcn.10454770
mov eax, dword [esp + 0x30]
add esp, 4
mov ebx, dword [eax + 0xc]
add ebx, dword [esp + 0x54]
mov dword [esp + 0x1c], ebx
cmp ebp, 3
jl 0x1045dca3
mov eax, dword [eax]
lea ebx, [ebx + eax*4]
mov dword [esp + 0x1c], ebx
mov esi, dword [esp + 0x20]
xor ebp, ebp
mov ebx, dword [esp + 0x10]
add esi, 0x6c
mov dword [esp + 0x2c], esi
mov edi, esi
mov esi, dword [esp + 0x24]
nop word [eax + eax]
cmp dword [edi], 0
jne 0x1045dce9
push ebx
call fcn.10080bb0
add esp, 4
mov dword [edi], eax
test eax, eax
jne 0x1045dce9
push str.Failed_to_allocate_PC_TREE
push 2
push dword [esi + 0x1ac4]
call fcn.1006e850
add esp, 0xc
mov eax, dword [edi]
add edi, 4
mov dword [eax + 0x7c], ebp
inc ebp
cmp ebp, 4
jl 0x1045dcc0
mov esi, dword [esp + 0x2c]
xor edi, edi
mov ebx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x238]
mov ebp, dword [esp + 0x18]
mov eax, edi
sar eax, 1
mov edx, edi
imul eax, dword [esp + 0x4c]
and edx, 1
imul edx, dword [esp + 0x4c]
mov dword [esp + 0x7c], closesocket
mov dword [esp + 0x84], 0xffffffff
mov dword [esp + 0x88], htons
add ebp, eax
mov dword [esp + 0x8c], 0xffffffff
mov dword [esp + 0x90], htons
mov dword [esp + 0x94], 0xffffffff
mov dword [esp + 0x98], htons
mov byte [esp + 0x9c], 0
mov dword [esp + 0x80], 0
cmp ebp, dword [ecx + 0xc]
jge 0x1045dee3
mov eax, dword [esp + 0x30]
add eax, edx
mov dword [esp + 0x1c], eax
cmp eax, dword [ecx + 0x10]
jge 0x1045dee3
mov eax, dword [esp + 0x44]
mov ecx, dword [eax + 0x10]
mov eax, dword [esp + 0x48]
mov eax, dword [eax + 0x3e24]
mov eax, dword [eax + ecx*4]
add eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x24]
add eax, edx
mov dword [ecx + 0x109c], eax
mov eax, ebp
and eax, 0x1f
add eax, 0x10a4
add eax, ecx
mov dword [ecx + 0x10a0], eax
mov eax, dword [esi]
mov eax, dword [eax + 8]
test eax, eax
jne 0x1045de1b
mov eax, dword [esp + 0x38]
add eax, 0x24994
push eax
push dword [esp + 0x14]
push dword [esp + 0x30]
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 0x1045de24
mov eax, dword [esp + 0x24]
push str.Failed_to_allocate_PICK_MODE_CONTEXT
push 2
push dword [eax + 0x1ac4]
call fcn.1006e850
add esp, 0xc
jmp 0x1045de24
push eax
call fcn.10081450
add esp, 4
mov eax, dword [esi]
mov byte [eax], 0
mov eax, dword [esi]
push dword [eax + 8]
lea eax, [esp + 0x80]
push dword [esp + 0x14]
push eax
push dword [esp + 0x28]
push ebp
push dword [esp + 0x48]
push dword [esp + 0x54]
push dword [esp + 0x44]
call fcn.1045ad00
add ebx, dword [esp + 0x9c]
mov eax, dword [esp + 0xa4]
add dword [esp + 0x7c], eax
mov eax, dword [esp + 0xa8]
adc dword [esp + 0x80], eax
lea eax, [esp + 0x74]
push eax
mov eax, dword [esp + 0x58]
mov dword [esp + 0x78], ebx
push dword [eax + 0x31cc]
call fcn.10454ed0
mov eax, dword [esp + 0xe0]
add esp, 0x28
cmp eax, dword [esp + 0x68]
jl 0x1045def2
jg 0x1045dea7
mov eax, dword [esp + 0xb4]
cmp eax, dword [esp + 0x64]
jb 0x1045def2
cmp edi, 3
je 0x1045ded8
mov eax, dword [esi]
push 0
push dword [eax + 8]
push 0
push dword [esp + 0x1c]
push 1
push dword [esp + 0x30]
push ebp
push dword [esp + 0x6c]
push dword [esp + 0x58]
push dword [esp + 0x60]
push dword [esp + 0x50]
call fcn.104587c0
add esp, 0x2c
mov ecx, dword [esp + 0x238]
mov ebx, dword [esp + 0x54]
inc edi
add esi, 4
cmp edi, 4
jl 0x1045dd08
jmp 0x1045def6
mov ebx, dword [esp + 0x54]
mov ebp, dword [esp + 0x34]
lea eax, [esp + 0xcc]
push 3
push dword [esp + 0x18]
push dword [esp + 0x38]
push dword [esp + 0x24]
push eax
push ebp
call fcn.1009f610
mov ecx, dword [esp + 0x78]
mov eax, ebx
imul dword [ebp + 0x31cc]
add esp, 0x18
mov esi, eax
mov eax, dword [esp + 0x5c]
add esi, 0x100
adc edx, 0
shld ecx, eax, 7
shrd esi, edx, 9
shl eax, 7
sar edx, 9
add esi, eax
adc edx, ecx
cmp edx, dword [esp + 0xb8]
jg 0x1045df61
jl 0x1045df5a
cmp esi, dword [esp + 0xb4]
jae 0x1045df61
mov eax, 1
jmp 0x1045df63
xor eax, eax
mov ecx, dword [esp + 0x214]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.105116c0
add esp, 0x208
ret