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

Disassembly:
sub esp, 0x58
movzx eax, byte [esp + 0x60]
push ebp
mov dword [esp + 0x1c], eax
push edi
mov ecx, dword [eax*4 + 0x10a0a45c]
mov edi, dword [esp + 0x64]
mov dword [esp + 0x28], ecx
sub eax, 0
je 0x1046ac4e
sub eax, 1
je 0x1046ac5b
sub eax, 1
je 0x1046ac69
jmp 0x1046ac77
mov dword [edi], 0
mov dword [edi + 4], 0
mov dword [edi + 8], 0x10000
mov dword [edi + 0xc], 0
mov eax, dword [edi + 0xc]
neg eax
mov dword [edi + 0x10], eax
mov eax, dword [edi + 8]
mov dword [edi + 0x14], eax
mov eax, dword [edi + 0x14]
cmp eax, 0x10000
jne 0x1046acac
cmp dword [edi + 0x10], 0
jne 0x1046acac
lea ebp, [edi + 8]
mov dword [esp + 0x64], ebp
cmp dword [ebp], eax
jne 0x1046acac
cmp dword [edi + 0xc], 0
jne 0x1046acac
cmp dword [edi + 4], 0
jne 0x1046aca8
cmp dword [edi], 0
jne 0x1046aca8
xor al, al
jmp 0x1046accc
mov al, 1
jmp 0x1046accc
lea ebp, [edi + 8]
mov dword [esp + 0x64], ebp
cmp dword [ebp], eax
jne 0x1046acc6
mov eax, dword [edi + 0x10]
neg eax
cmp dword [edi + 0xc], eax
jne 0x1046acc6
mov al, 2
jmp 0x1046accc
mov al, 3
mov dword [esp + 0x64], ebp
mov edx, dword [esp + 0x9c]
mov ecx, dword [esp + 0x98]
mov byte [edi + 0x20], al
call fcn.10511ed0
cmp dword [esp + 0x94], 0
jne 0x1046ad7b
mulsd xmm0, qword [0x1081f650]
sub esp, 8
movsd qword [esp + 0x60], xmm0
fld qword [esp + 0x60]
fstp qword [esp]
call fcn.105279ae
push dword [esp + 0xac]
cdq
push dword [esp + 0xac]
push edx
push eax
push 0
push 0
push dword [esp + 0xac]
push dword [esp + 0xac]
push 0
push 0
push dword [esp + 0xc0]
push dword [esp + 0xb8]
push dword [esp + 0xb8]
push dword [esp + 0xb8]
push dword [esp + 0xb8]
push dword [esp + 0xb8]
push dword [esp + 0xb8]
push dword [esp + 0xb8]
push edi
call fcn.1046b610
add esp, 0x54
pop edi
pop ebp
add esp, 0x58
ret
mulsd xmm0, qword [0x105fe8f8]
push ebx
push esi
sub esp, 8
movsd qword [esp + 0x68], xmm0
fld qword [esp + 0x68]
fstp qword [esp]
call fcn.105279ae
push dword [esp + 0xb4]
cdq
push dword [esp + 0xb4]
mov esi, edx
mov ebx, eax
push esi
push ebx
push 0
push 0
push dword [esp + 0xb4]
push dword [esp + 0xb4]
push 0
push 0
push dword [esp + 0xc8]
push dword [esp + 0xc0]
push dword [esp + 0xc0]
push dword [esp + 0xc0]
push dword [esp + 0xc0]
push dword [esp + 0xc0]
push dword [esp + 0xc0]
push dword [esp + 0xc0]
push edi
call fcn.1046b610
add esp, 0x54
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], edx
cmp edx, esi
jl 0x1046ae28
jg 0x1046ae18
cmp eax, ebx
jbe 0x1046ae28
pop esi
pop ebx
pop edi
or eax, 0xffffffff
mov edx, closesocket
pop ebp
add esp, 0x58
ret
mov esi, dword [esp + 0x9c]
mov ebx, 1
lea ecx, [esi - 1]
shl ebx, cl
mov dword [esp + 0x20], ebx
test esi, esi
jle 0x1046b2f6
mov ecx, dword [esp + 0x30]
nop dword [eax]
xor eax, eax
mov dword [esp + 0x2c], eax
test ecx, ecx
jle 0x1046b2d9
mov dword [esp + 0x38], 0xa
mov ebx, edi
mov dword [esp + 0x3c], 1
mov dword [esp + 0x40], 0x1000
mov dword [esp + 0x44], 0x1000
mov dword [esp + 0x48], 0xa
mov dword [esp + 0x4c], 1
mov dword [esp + 0x50], 0x1000
mov dword [esp + 0x54], 0x1000
mov dword [esp + 0x18], edi
nop dword [eax]
nop dword [eax + eax]
mov ebx, dword [ebx]
mov dword [esp + 0x24], 0
mov dword [esp + 0x1c], ebx
cmp eax, 2
je 0x1046aecc
cmp eax, 5
je 0x1046aecc
xor esi, esi
jmp 0x1046aed1
mov esi, 0x10000
cmp eax, 2
mov edx, ebx
sbb eax, eax
sub edx, esi
and eax, 0xfffffffc
add eax, 4
mov dword [esp + 0x34], eax
mov ebp, dword [esp + eax + 0x38]
mov ecx, ebp
sar edx, cl
mov ecx, dword [esp + eax + 0x40]
mov eax, ecx
sub edx, dword [esp + 0x20]
neg eax
cmp edx, eax
jl 0x1046af03
cmp edx, ecx
mov eax, edx
cmovg eax, ecx
mov ecx, ebp
shl eax, cl
add eax, esi
mov esi, dword [esp + 0x18]
mov dword [esi], eax
mov eax, dword [esp + 0x28]
sub eax, 0
je 0x1046af24
sub eax, 1
je 0x1046af31
sub eax, 1
je 0x1046af42
jmp 0x1046af53
mov dword [edi], 0
mov dword [edi + 4], 0
mov eax, dword [esp + 0x6c]
mov dword [edi + 0xc], 0
mov dword [eax], 0x10000
mov eax, dword [edi + 0xc]
neg eax
mov dword [edi + 0x10], eax
mov eax, dword [esp + 0x6c]
mov eax, dword [eax]
mov dword [edi + 0x14], eax
push dword [esp + 0xac]
mov ebp, dword [esp + 0x18]
push dword [esp + 0xac]
mov al, byte [esp + 0x78]
push dword [esp + 0x18]
mov byte [edi + 0x20], al
push ebp
push 0
push 0
push dword [esp + 0xac]
push dword [esp + 0xac]
push 0
push 0
push dword [esp + 0xc0]
push dword [esp + 0xb8]
push dword [esp + 0xb8]
push dword [esp + 0xb8]
push dword [esp + 0xb8]
push dword [esp + 0xb8]
push dword [esp + 0xb8]
push dword [esp + 0xb8]
push edi
call fcn.1046b610
add esp, 0x4c
cmp edx, dword [esp + 0x10]
jg 0x1046afea
jl 0x1046afd4
cmp eax, ebp
jae 0x1046afea
mov dword [esp + 0x14], eax
mov eax, dword [esi]
mov dword [esp + 0x10], edx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x24], 0xffffffff
mov eax, dword [esp + 0x2c]
cmp eax, 2
je 0x1046affc
cmp eax, 5
je 0x1046affc
xor edx, edx
jmp 0x1046b001
mov edx, 0x10000
mov ebp, dword [esp + 0x34]
sub ebx, edx
mov esi, dword [esp + ebp + 0x48]
mov ecx, esi
sar ebx, cl
mov ecx, dword [esp + ebp + 0x50]
mov eax, ecx
add ebx, dword [esp + 0x20]
neg eax
cmp ebx, eax
jl 0x1046b026
cmp ebx, ecx
mov eax, ebx
cmovg eax, ecx
mov ebx, dword [esp + 0x18]
mov ecx, esi
shl eax, cl
add eax, edx
mov dword [ebx], eax
mov eax, dword [esp + 0x28]
sub eax, 0
je 0x1046b047
sub eax, 1
je 0x1046b054
sub eax, 1
je 0x1046b065
jmp 0x1046b076
mov dword [edi], 0
mov dword [edi + 4], 0
mov eax, dword [esp + 0x6c]
mov dword [edi + 0xc], 0
mov dword [eax], 0x10000
mov eax, dword [edi + 0xc]
neg eax
mov dword [edi + 0x10], eax
mov eax, dword [esp + 0x6c]
mov eax, dword [eax]
mov dword [edi + 0x14], eax
push dword [esp + 0xac]
mov esi, dword [esp + 0x18]
push dword [esp + 0xac]
mov al, byte [esp + 0x78]
push dword [esp + 0x18]
mov byte [edi + 0x20], al
push esi
push 0
push 0
push dword [esp + 0xac]
push dword [esp + 0xac]
push 0
push 0
push dword [esp + 0xc0]
push dword [esp + 0xb8]
push dword [esp + 0xb8]
push dword [esp + 0xb8]
push dword [esp + 0xb8]
push dword [esp + 0xb8]
push dword [esp + 0xb8]
push dword [esp + 0xb8]
push edi
call fcn.1046b610
add esp, 0x4c
cmp edx, dword [esp + 0x10]
jg 0x1046b110
jl 0x1046b0f7
cmp eax, esi
jae 0x1046b110
mov ecx, dword [ebx]
mov dword [esp + 0x14], eax
mov eax, 1
mov dword [esp + 0x10], edx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x24], eax
jmp 0x1046b120
mov eax, dword [esp + 0x24]
test eax, eax
je 0x1046b278
mov ecx, dword [esp + 0x1c]
imul eax, dword [esp + 0x20]
mov dword [esp + 0x58], 0xa
mov dword [esp + 0x5c], 1
mov ebx, dword [esp + ebp + 0x58]
mov dword [esp + 0x60], 0x1000
mov dword [esp + 0x64], 0x1000
mov ebp, dword [esp + ebp + 0x60]
mov esi, ebp
mov dword [esp + 0x34], eax
neg esi
mov eax, dword [esp + 0x2c]
cmp eax, 2
je 0x1046b167
cmp eax, 5
je 0x1046b167
xor edx, edx
jmp 0x1046b16c
mov edx, 0x10000
mov eax, ecx
mov ecx, ebx
sub eax, edx
sar eax, cl
add eax, dword [esp + 0x34]
cmp eax, esi
jge 0x1046b180
mov eax, esi
jmp 0x1046b185
cmp eax, ebp
cmovg eax, ebp
mov ecx, ebx
shl eax, cl
mov ecx, dword [esp + 0x18]
add eax, edx
mov dword [ecx], eax
mov eax, dword [esp + 0x28]
sub eax, 0
je 0x1046b1a6
sub eax, 1
je 0x1046b1b3
sub eax, 1
je 0x1046b1c4
jmp 0x1046b1d5
mov dword [edi], 0
mov dword [edi + 4], 0
mov eax, dword [esp + 0x6c]
mov dword [edi + 0xc], 0
mov dword [eax], 0x10000
mov eax, dword [edi + 0xc]
neg eax
mov dword [edi + 0x10], eax
mov eax, dword [esp + 0x6c]
mov eax, dword [eax]
mov dword [edi + 0x14], eax
push dword [esp + 0xac]
mov al, byte [esp + 0x74]
push dword [esp + 0xac]
mov byte [edi + 0x20], al
push dword [esp + 0x18]
push dword [esp + 0x20]
push 0
push 0
push dword [esp + 0xac]
push dword [esp + 0xac]
push 0
push 0
push dword [esp + 0xc0]
push dword [esp + 0xb8]
push dword [esp + 0xb8]
push dword [esp + 0xb8]
push dword [esp + 0xb8]
push dword [esp + 0xb8]
push dword [esp + 0xb8]
push dword [esp + 0xb8]
push edi
call fcn.1046b610
add esp, 0x4c
cmp edx, dword [esp + 0x10]
jg 0x1046b274
jl 0x1046b257
cmp eax, dword [esp + 0x14]
jae 0x1046b274
cmp dword [esp + 0x24], 0
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x10], edx
mov ecx, dword [eax]
mov dword [esp + 0x1c], ecx
jne 0x1046b155
mov ebx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
mov dword [ebx], eax
mov eax, dword [esp + 0x28]
sub eax, 0
je 0x1046b32d
sub eax, 1
je 0x1046b33a
sub eax, 1
jne 0x1046b2ab
mov ebp, dword [esp + 0x6c]
mov eax, dword [edi + 0xc]
neg eax
mov dword [edi + 0x10], eax
mov eax, dword [ebp]
mov dword [edi + 0x14], eax
mov al, byte [esp + 0x70]
add ebx, 4
mov ecx, dword [esp + 0x30]
mov byte [edi + 0x20], al
mov eax, dword [esp + 0x2c]
inc eax
mov dword [esp + 0x18], ebx
mov dword [esp + 0x2c], eax
cmp eax, ecx
jl 0x1046aeb0
mov ebx, dword [esp + 0x20]
mov esi, dword [esp + 0x9c]
sar ebx, 1
sub esi, 1
mov dword [esp + 0x20], ebx
mov dword [esp + 0x9c], esi
jne 0x1046ae50
mov edx, dword [esp + 0x10]
lea ebp, [edi + 8]
mov eax, dword [edi + 0x14]
cmp eax, 0x10000
jne 0x1046b362
cmp dword [edi + 0x10], 0
jne 0x1046b362
cmp dword [ebp], eax
jne 0x1046b362
cmp dword [edi + 0xc], 0
jne 0x1046b367
cmp dword [edi + 4], 0
jne 0x1046b351
cmp dword [edi], 0
jne 0x1046b351
pop esi
xor al, al
pop ebx
mov byte [edi + 0x20], al
mov eax, dword [esp + 0xc]
pop edi
pop ebp
add esp, 0x58
ret
mov dword [edi], 0
mov dword [edi + 4], 0
mov ebp, dword [esp + 0x6c]
mov dword [edi + 0xc], 0
mov dword [ebp], 0x10000
jmp 0x1046b29d
pop esi
mov al, 1
pop ebx
mov byte [edi + 0x20], al
mov eax, dword [esp + 0xc]
pop edi
pop ebp
add esp, 0x58
ret
cmp dword [ebp], eax
jne 0x1046b373
mov eax, dword [edi + 0x10]
neg eax
cmp dword [edi + 0xc], eax
mov al, 2
je 0x1046b375
mov al, 3
pop esi
pop ebx
mov byte [edi + 0x20], al
mov eax, dword [esp + 0xc]
pop edi
pop ebp
add esp, 0x58
ret