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

Disassembly:
push edi
push esi
push ebp
push ebx
sub esp, 0x38
mov eax, dword [esp + 0x50]
mov esi, dword [esp + 0x58]
cmp esi, 0x11
jl 0x10046a23
mov edx, dword [esp + 0x54]
cmp eax, edx
je 0x10046d9a
cmp esi, 0x13
jl 0x1004697a
mov ecx, esi
mov ebx, 1
shl ebx, cl
mov edx, ebx
shl edx, 3
push edx
mov ebp, dword [esp + 0x58]
push ebp
push eax
call fcn.10082b90
mov edx, dword [esp + 0x4c]
mov eax, dword [esp + 0x5c]
lea eax, [eax + 0x8000]
mov edi, dword [edx + 0x24]
mov ecx, ebx
sar ecx, 0xc
lea edx, [edi + ecx*4]
test ecx, ecx
jle 0x10046a84
mov dword [esp + 0x24], ebx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x2c], edx
mov dword [esp + 0x34], ecx
mov dword [esp + 0x18], edi
xor ebp, ebp
mov dword [esp + 0x20], ebp
mov edi, ebp
mov eax, dword [esp + 0x18]
mov ebx, dword [eax + edi*4]
cmp ebp, ebx
jl 0x100468ba
je 0x10046d45
jmp 0x1004695b
mov esi, dword [esp + 0x54]
lea eax, [esi + ebp*8]
mov esi, dword [esp + 0x24]
mov dword [esp + 0x28], eax
sar esi, 6
mov edx, 0x40
push edx
push edx
push esi
mov ecx, dword [esp + 0x68]
push ecx
push eax
call fcn.10082bd0
mov eax, dword [esp + 0x40]
push eax
push 0x1000
mov edx, dword [esp + 0x78]
push edx
call fcn.10082c70
mov eax, dword [esp + 0x74]
lea ebx, [eax + ebx*8]
mov edx, 0x40
push edx
push edx
push esi
mov ecx, dword [esp + 0x48]
push ecx
push ebx
call fcn.10082bd0
mov eax, dword [esp + 0x60]
push eax
push 0x1000
mov edx, dword [esp + 0x58]
push edx
call fcn.10082c70
push 0
mov eax, 0x40
push eax
push eax
push esi
mov edx, dword [esp + 0xac]
push edx
push ebx
call fcn.10082e60
push 0
mov eax, 0x40
push eax
push eax
push esi
mov edx, dword [esp + 0x84]
push edx
mov ecx, dword [esp + 0x94]
push ecx
call fcn.10082e60
add esp, 0x70
mov eax, dword [esp + 0x34]
add edi, 1
add ebp, 0x40
cmp edi, eax
jl 0x100468a4
mov ebx, dword [esp + 0x24]
mov esi, dword [esp + 0x58]
jmp 0x10046a84
mov edx, dword [esp + 0x4c]
mov edi, dword [edx + 0x24]
mov ecx, esi
mov ebx, 1
shl ebx, cl
mov ecx, ebx
sar ecx, 0xc
lea edx, [edi + ecx*4]
test ecx, ecx
jle 0x10046a84
mov dword [esp + 0x24], ebx
mov dword [esp + 0x2c], edx
mov dword [esp + 0x34], ecx
mov dword [esp + 0x1c], edi
mov edi, dword [esp + 0x5c]
xor ebp, ebp
mov dword [esp + 0x28], ebp
mov esi, ebp
mov dword [esp + 0x20], ebp
mov ebp, ebx
mov ebx, dword [esp + 0x20]
sar ebp, 6
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x50]
mov ecx, dword [eax + esi*4]
lea edx, [edx + ecx*8]
mov eax, 0x40
push eax
push eax
push ebp
push edi
push edx
call fcn.10082bd0
mov eax, dword [esp + 0x40]
push eax
push 0x1000
push edi
call fcn.10082c70
mov eax, dword [esp + 0x74]
push 0
lea ecx, [eax + ebx*8]
mov edx, 0x40
push edx
push edx
push ebp
push edi
push ecx
call fcn.10082e60
add esp, 0x38
mov eax, dword [esp + 0x34]
add esi, 1
add ebx, 0x40
cmp esi, eax
jl 0x100469c3
mov ebx, dword [esp + 0x24]
mov esi, dword [esp + 0x58]
jmp 0x10046a84
mov edx, dword [esp + 0x54]
cmp eax, edx
je 0x10046f36
cmp esi, 0x10
jl 0x10046a65
mov ecx, esi
mov ebx, 1
shl ebx, cl
mov edx, ebx
shl edx, 3
push edx
mov ebp, dword [esp + 0x58]
push ebp
push eax
call fcn.10082b90
mov eax, dword [esp + 0x4c]
push dword [eax + 0x24]
push ebx
mov edx, dword [esp + 0x5c]
push edx
call fcn.10048600
add esp, 0xc
jmp 0x10046a84
mov edx, dword [esp + 0x4c]
push dword [edx + 0x24]
mov ecx, esi
mov ebx, 1
shl ebx, cl
push ebx
mov ebp, dword [esp + 0x5c]
push ebp
push eax
call fcn.100453c0
add esp, 0x10
mov eax, dword [esi*4 + 0x100a09fc]
test eax, eax
jne 0x10046b9a
cmp ebx, 0x4000
mov ecx, ebx
jl 0x10046aa2
mov ecx, 0x4000
test ebx, ebx
jle 0x10046b64
mov edi, dword [esp + 0x54]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x24], ebx
xor esi, esi
mov ebx, dword [esp + 0x4c]
lea ebp, [ecx - 0x8000]
lea eax, [edi + esi*8]
mov ecx, ebp
test ebp, ebp
jl 0x10046b29
mov edi, dword [esp + 0x5c]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x34], ebp
lea edx, [eax + ecx*8]
mov dword [esp + 0x20], esi
mov ebp, edx
mov esi, ecx
push 1
push edi
push dword [ebx + 0x28]
push 0x8000
push ebp
call fcn.100456c0
add esp, 0x14
mov eax, dword [ebx + 8]
test eax, eax
je 0x10046b0b
push 0x10000
push ebp
push dword [ebx + 0x10]
call fcn.10021438
add ebp, 0xfffc0000
add esi, 0xffff8000
jns 0x10046ae2
mov eax, dword [esp + 0x2c]
mov ebp, dword [esp + 0x34]
mov esi, dword [esp + 0x20]
mov edi, dword [esp + 0x54]
mov edx, dword [ebx + 0x2c]
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], edx
mov edx, dword [esp + 0x30]
mov ecx, 0x8000
mov dword [esp + 0x14], 0x400
call fcn.1003824c
add esi, dword [esp + 0x30]
mov eax, dword [esp + 0x24]
cmp esi, eax
jl 0x10046ac2
mov ecx, dword [esp + 0x30]
mov ebx, eax
cmp ebx, ecx
jle 0x10046d3d
mov ebp, dword [esp + 0x4c]
mov eax, dword [esp + 0x54]
mov esi, dword [ebp + 0x30]
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], 1
mov edx, ebx
mov dword [esp + 0x14], 0x100
call fcn.1003824c
add esp, 0x38
pop ebx
pop ebp
pop esi
pop edi
ret
mov edi, dword [esp + 0x54]
mov ebp, esi
sub ebp, eax
mov ecx, ebp
mov ebx, 1
shl ebx, cl
mov ecx, eax
mov edx, 1
shl edx, cl
cmp ebp, 0xf
jg 0x10046c07
test edx, edx
jle 0x10046c52
mov esi, dword [esp + 0x4c]
mov dword [esp + 0x2c], edx
mov dword [esp + 0x34], eax
xor ebp, ebp
push 0
mov eax, dword [esp + 0x60]
push eax
push dword [esi + 0x28]
push ebx
push edi
call fcn.100456c0
add esp, 0x14
mov eax, dword [esi + 8]
test eax, eax
je 0x10046bf7
lea eax, [ebx + ebx]
push eax
push edi
push dword [esi + 0x10]
call fcn.10021438
mov eax, dword [esp + 0x2c]
lea edi, [edi + ebx*8]
add ebp, 1
cmp ebp, eax
jl 0x10046bcf
jmp 0x10046c48
test edx, edx
jle 0x10046c52
mov esi, dword [esp + 0x5c]
mov dword [esp + 0x2c], edx
mov dword [esp + 0x1c], ebp
xor ecx, ecx
mov dword [esp + 0x34], eax
mov ebp, ecx
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0xc], 1
mov dword [esp + 0x10], esi
mov edx, edi
call fcn.10046f5c
mov eax, dword [esp + 0x2c]
lea edi, [edi + ebx*8]
add ebp, 1
cmp ebp, eax
jl 0x10046c1f
mov edx, eax
mov eax, dword [esp + 0x34]
mov esi, dword [esp + 0x58]
mov ebp, dword [esp + 0x4c]
mov ecx, dword [esi*4 + 0x100a0a5c]
mov ebp, dword [ebp + 0x48]
sub ecx, eax
mov edi, 1
shl edi, cl
test ebx, ebx
jle 0x10046d3d
mov dword [esp + 0x2c], edx
mov ecx, eax
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], eax
xor esi, esi
and ecx, 1
mov dword [esp + 0x28], ecx
mov ebx, dword [esp + 0x54]
push edi
mov eax, dword [esp + 0x30]
lea ebx, [ebx + esi*8]
push eax
mov edx, dword [esp + 0x38]
push edx
mov ecx, dword [esp + 0x68]
push ecx
push ebx
call fcn.10082bd0
add esp, 0x14
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x34]
mov edx, edi
cmp ecx, 2
jl 0x10046d08
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], esi
mov esi, edx
mov ecx, 2
mov ebx, ecx
mov dword [esp + 0x20], edi
mov edi, ebp
mov ebp, eax
push edi
sar ebp, 2
push ebp
push esi
mov eax, dword [esp + 0x68]
push eax
push eax
call fcn.10082fe0
add esp, 0x14
lea eax, [esi + esi*2]
lea edi, [edi + eax*8]
mov eax, dword [esp + 0x34]
shl esi, 2
add ebx, 2
cmp ebx, eax
jle 0x10046cd0
mov ebx, dword [esp + 0x18]
mov edx, esi
mov esi, dword [esp + 0x1c]
mov ebp, edi
mov edi, dword [esp + 0x20]
mov eax, dword [esp + 0x28]
test eax, eax
jne 0x10046f13
push 1
push edi
mov eax, dword [esp + 0x34]
push eax
mov edx, dword [esp + 0x3c]
push edx
mov ecx, dword [esp + 0x6c]
push ecx
push ebx
call fcn.10082e60
add esp, 0x18
mov eax, dword [esp + 0x30]
add esi, edi
cmp esi, eax
jl 0x10046c88
add esp, 0x38
pop ebx
pop ebp
pop esi
pop edi
ret
mov esi, dword [esp + 0x54]
mov ebx, dword [esp + 0x24]
lea esi, [esi + ebp*8]
sar ebx, 6
mov eax, 0x40
push eax
push eax
push ebx
mov edx, dword [esp + 0x68]
push edx
push esi
call fcn.10082bd0
mov eax, dword [esp + 0x40]
push eax
push 0x1000
mov edx, dword [esp + 0x78]
push edx
call fcn.10082c70
push 0
mov eax, 0x40
push eax
push eax
push ebx
mov edx, dword [esp + 0x8c]
push edx
push esi
call fcn.10082e60
add esp, 0x38
jmp 0x1004695b
mov edx, dword [esp + 0x4c]
mov eax, dword [esp + 0x5c]
lea eax, [eax + 0x8000]
mov ebp, dword [edx + 0x24]
mov ecx, esi
mov ebx, 1
shl ebx, cl
mov ecx, ebx
sar ecx, 0xc
lea edx, [ebp + ecx*4]
test ecx, ecx
jle 0x10046a84
mov dword [esp + 0x1c], eax
mov dword [esp + 0x28], edx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x24], ebx
xor edi, edi
mov dword [esp + 0x30], edi
mov dword [esp + 0x20], edi
mov esi, edi
mov edi, dword [esp + 0x30]
mov eax, dword [esp + 0x2c]
mov ebx, dword [eax + edi*4]
cmp esi, ebx
jl 0x10046dff
je 0x10046ec0
jmp 0x10046ea1
mov ebp, dword [esp + 0x54]
lea eax, [ebp + esi*8]
mov ebp, dword [esp + 0x24]
mov dword [esp + 0x34], eax
sar ebp, 6
mov edx, 0x40
push edx
push edx
push ebp
mov ecx, dword [esp + 0x68]
push ecx
push eax
call fcn.10082bd0
mov eax, dword [esp + 0x3c]
push eax
push 0x1000
mov edx, dword [esp + 0x78]
push edx
call fcn.10082c70
mov eax, dword [esp + 0x74]
lea ebx, [eax + ebx*8]
mov edx, 0x40
push edx
push edx
push ebp
mov ecx, dword [esp + 0x48]
push ecx
push ebx
call fcn.10082bd0
mov eax, dword [esp + 0x5c]
push eax
push 0x1000
mov edx, dword [esp + 0x58]
push edx
call fcn.10082c70
push 0
mov eax, 0x40
push eax
push eax
push ebp
mov edx, dword [esp + 0xac]
push edx
push ebx
call fcn.10082e60
push 0
mov eax, 0x40
push eax
push eax
push ebp
mov edx, dword [esp + 0x84]
push edx
mov ecx, dword [esp + 0xa0]
push ecx
call fcn.10082e60
add esp, 0x70
mov eax, dword [esp + 0x18]
add edi, 1
add esi, 0x40
cmp edi, eax
jl 0x10046de9
mov ebx, dword [esp + 0x24]
mov esi, dword [esp + 0x58]
jmp 0x10046a84
mov ebp, dword [esp + 0x54]
mov ebx, dword [esp + 0x24]
lea ebp, [ebp + esi*8]
sar ebx, 6
mov eax, 0x40
push eax
push eax
push ebx
mov edx, dword [esp + 0x68]
push edx
push ebp
call fcn.10082bd0
mov eax, dword [esp + 0x3c]
push eax
push 0x1000
mov edx, dword [esp + 0x78]
push edx
call fcn.10082c70
push 0
mov eax, 0x40
push eax
push eax
push ebx
mov edx, dword [esp + 0x8c]
push edx
push ebp
call fcn.10082e60
add esp, 0x38
jmp 0x10046ea1
push ebp
push 1
push edx
mov eax, dword [esp + 0x68]
push eax
push eax
mov dword [esp + 0x38], edx
call fcn.10083110
mov edx, dword [esp + 0x38]
add esp, 0x14
lea ebp, [ebp + edx*8]
jmp 0x10046d14
mov eax, dword [esp + 0x4c]
push dword [eax + 0x24]
mov ecx, esi
mov ebx, 1
shl ebx, cl
push ebx
mov edx, dword [esp + 0x5c]
push edx
call fcn.10048600
add esp, 0xc
jmp 0x10046a84