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

Disassembly:
mov edx, dword [esp + 0x24]
sub esp, 0x74
mov eax, edx
test edx, edx
jg 0x46ccef
neg eax
cmp eax, 1
jle 0x46ccfc
test edx, edx
jg 0x46cd08
neg edx
jmp 0x46cd01
mov edx, 1
mov dword [esp + 0x98], edx
mov eax, dword [esp + 0x9c]
mov ecx, eax
test eax, eax
jg 0x46cd17
neg ecx
cmp ecx, 1
jle 0x46cd24
test eax, eax
jg 0x46cd30
neg eax
jmp 0x46cd29
mov eax, 1
mov dword [esp + 0x9c], eax
cmp edx, 1
jg 0x46cd86
cmp eax, 1
jg 0x46cd86
mov eax, dword [esp + 0x94]
mov ecx, dword [esp + 0x90]
mov edx, dword [esp + 0x8c]
push eax
mov eax, dword [esp + 0x8c]
push ecx
mov ecx, dword [esp + 0x8c]
push edx
mov edx, dword [esp + 0x8c]
push eax
mov eax, dword [esp + 0x8c]
push ecx
mov ecx, dword [esp + 0x8c]
push edx
push eax
push ecx
call fcn.00434610
add esp, 0x20
add esp, 0x74
ret
push esi
push edi
mov edi, dword [esp + 0x80]
test edi, edi
je 0x46d80b
cmp dword [edi], 0
je 0x46d80b
mov esi, dword [esp + 0x8c]
test esi, esi
je 0x46d80b
cmp dword [esi], 0
je 0x46d80b
mov edx, dword [esp + 0x9c]
mov ecx, dword [esp + 0x98]
push ebx
mov ebx, dword [esp + 0x88]
push ebp
mov ebp, dword [esp + 0x90]
lea eax, [edx + ebp]
push eax
lea edx, [ebx + ecx]
push edx
push ebp
push ebx
lea eax, [esp + 0x64]
push eax
call dword [sym.imp.USER32.dll_SetRect]
lea ecx, [edi + 0x10]
push ecx
lea edx, [esp + 0x58]
push edx
mov eax, edx
push eax
call dword [sym.imp.USER32.dll_IntersectRect]
test eax, eax
je 0x46cea1
mov ecx, dword [esp + 0x54]
mov edx, ecx
sub edx, ebx
mov ebx, dword [esp + 0x98]
add ebx, edx
mov edx, dword [esp + 0x58]
mov eax, edx
sub eax, ebp
mov ebp, dword [esp + 0x9c]
add ebp, eax
mov eax, dword [esp + 0x5c]
sub eax, ecx
mov dword [esp + 0xa0], eax
mov eax, dword [esp + 0x60]
sub eax, edx
push esi
mov dword [esp + 0xa8], eax
call fcn.0041b850
add esp, 4
push eax
push esi
call fcn.0041b830
add esp, 4
push eax
push 0
push 0
lea ecx, [esp + 0x84]
push ecx
call dword [sym.imp.USER32.dll_SetRect]
mov edx, dword [esp + 0xa4]
mov ecx, dword [esp + 0xa0]
lea eax, [edx + ebp]
push eax
lea edx, [ebx + ecx]
push edx
push ebp
push ebx
lea eax, [esp + 0x74]
push eax
call dword [sym.imp.USER32.dll_SetRect]
lea ecx, [esp + 0x74]
push ecx
lea edx, [esp + 0x68]
push edx
mov eax, edx
push eax
call dword [sym.imp.USER32.dll_IntersectRect]
test eax, eax
jne 0x46ceab
pop ebp
pop ebx
pop edi
xor eax, eax
pop esi
add esp, 0x74
ret
mov ecx, dword [esp + 0x64]
mov edx, dword [esp + 0x68]
mov eax, dword [esp + 0x5c]
sub ecx, ebx
mov ebx, dword [esp + 0x54]
add ebx, ecx
mov ecx, dword [esp + 0x58]
sub edx, ebp
mov ebp, dword [esp + 0x60]
add ecx, edx
sub eax, ebx
sub ebp, ecx
push edi
mov dword [esp + 0x58], ebx
mov dword [esp + 0x5c], ecx
mov dword [esp + 0xa4], eax
mov dword [esp + 0xa8], ebp
call fcn.0041b8b0
movzx eax, ax
shr eax, 3
push esi
mov dword [esp + 0x44], eax
call fcn.0041b8b0
movzx eax, ax
shr eax, 3
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x60]
push eax
push ebx
push edi
call fcn.004342d0
mov ecx, dword [esp + 0x7c]
mov edx, dword [esp + 0x78]
push ecx
push edx
push esi
mov dword [esp + 0x38], eax
call fcn.004342d0
mov edi, dword [edi + 0xc]
mov dword [esp + 0x3c], eax
mov eax, dword [esi + 0xc]
mov esi, dword [esp + 0x54]
imul esi, dword [esp + 0xc8]
neg eax
mov dword [esp + 0x64], eax
imul eax, dword [esp + 0xcc]
mov dword [esp + 0x50], eax
neg edi
mov eax, 4
add esp, 0x20
mov dword [esp + 0x2c], edi
mov ecx, 3
cmp dword [esp + 0x3c], eax
jne 0x46d1d2
cmp dword [esp + 0x34], eax
jne 0x46d1dc
mov dword [esp + 0x14], 0
test ebp, ebp
jle 0x46d7fe
mov eax, dword [esp + 0xa0]
cdq
idiv dword [esp + 0xa8]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0xac]
dec eax
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], eax
jmp 0x46cfb0
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x28]
mov edi, dword [esp + 0x1c]
add edx, ecx
cmp edx, dword [esp + 0xa4]
mov dword [esp + 0x40], edi
lea ebp, [esi + edi - 4]
mov ebx, edi
jge 0x46cfe3
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x44]
mov ebx, ecx
sub ebx, eax
sub ebp, eax
add ebx, edi
add ebp, ecx
mov eax, dword [esp + 0x18]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x20], eax
test eax, eax
jle 0x46d0ef
mov ecx, dword [esp + 0x1c]
mov eax, 3
sub eax, esi
mov dword [esp + 0x48], eax
mov eax, 4
sub eax, esi
mov dword [esp + 0x3c], eax
mov eax, 5
sub eax, esi
lea edx, [esi + ecx - 2]
mov dword [esp + 0x4c], eax
movzx ecx, byte [ebp]
movzx eax, byte [edx - 2]
add eax, ecx
movzx ecx, byte [ebx]
add eax, ecx
movzx ecx, byte [edi]
add eax, ecx
sar eax, 2
mov byte [esp + 0x10], al
mov eax, dword [esp + 0x48]
movzx ecx, byte [eax + edx]
movzx eax, byte [edx - 1]
add ecx, eax
movzx eax, byte [ebp + 1]
add ecx, eax
movzx eax, byte [ebx + 1]
add ecx, eax
sar ecx, 2
mov byte [esp + 0x11], cl
mov ecx, dword [esp + 0x3c]
movzx eax, byte [ecx + edx]
movzx ecx, byte [ebp + 2]
add eax, ecx
movzx ecx, byte [ebx + 2]
add eax, ecx
movzx ecx, byte [edx]
add eax, ecx
sar eax, 2
mov byte [esp + 0x12], al
mov eax, dword [esp + 0x4c]
movzx ecx, byte [eax + edx]
movzx eax, byte [edx + 1]
add ecx, eax
movzx eax, byte [ebp + 3]
add ecx, eax
movzx eax, byte [ebx + 3]
add ecx, eax
sar ecx, 2
cmp dword [esp + 0xa8], 0
mov byte [esp + 0x13], cl
jle 0x46d0d2
mov eax, dword [esp + 0x10]
mov edi, dword [esp + 0x34]
mov ecx, dword [esp + 0xa8]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0xa8]
mov edi, dword [esp + 0x40]
lea ecx, [ecx + eax*4]
mov dword [esp + 0x34], ecx
mov eax, dword [esp + 0x20]
dec eax
add edi, esi
add edx, esi
add ebx, esi
add ebp, esi
mov dword [esp + 0x40], edi
mov dword [esp + 0x20], eax
test eax, eax
jg 0x46d024
mov eax, dword [esp + 0x24]
test eax, eax
jle 0x46d145
movzx ecx, byte [edi]
movzx edx, byte [ebx]
add edx, ecx
movzx ecx, byte [edi + 1]
sar edx, 1
mov byte [esp + 0x10], dl
movzx edx, byte [ebx + 1]
add edx, ecx
movzx ecx, byte [edi + 2]
sar edx, 1
mov byte [esp + 0x11], dl
movzx edx, byte [ebx + 2]
add edx, ecx
movzx ecx, byte [edi + 3]
sar edx, 1
mov byte [esp + 0x12], dl
movzx edx, byte [ebx + 3]
add edx, ecx
sar edx, 1
mov byte [esp + 0x13], dl
test eax, eax
jle 0x46d145
mov edi, dword [esp + 0x34]
mov ecx, eax
mov eax, dword [esp + 0x10]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x28]
mov dword [esp + 0x34], eax
add eax, dword [esp + 0x2c]
inc ecx
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0xa4]
lea edi, [edx + ecx]
cmp edi, eax
mov dword [esp + 0x14], ecx
jge 0x46d174
mov eax, edx
jmp 0x46d176
sub eax, ecx
test eax, eax
jle 0x46d1ac
mov ebp, dword [esp + 0xa0]
mov edi, dword [esp + 0x18]
add ebp, ebp
add ebp, ebp
add dword [esp + 0x14], eax
mov ebx, eax
nop
mov edx, dword [esp + 0x34]
push ebp
push edx
push edi
call fcn.004f37d0
add edi, dword [esp + 0x38]
add esp, 0xc
sub ebx, 1
jne 0x46d190
mov dword [esp + 0x18], edi
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0xa4]
add dword [esp + 0x1c], eax
cmp dword [esp + 0x14], ecx
jl 0x46cfb0
pop ebp
pop ebx
pop edi
mov eax, 1
pop esi
add esp, 0x74
ret
cmp dword [esp + 0x3c], ecx
jb 0x46d414
cmp dword [esp + 0x34], ecx
jb 0x46d414
mov dword [esp + 0x14], 0
test ebp, ebp
jle 0x46d7fe
mov eax, dword [esp + 0xa0]
cdq
idiv dword [esp + 0xa8]
mov ecx, esi
sub ecx, dword [esp + 0x34]
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0xac]
dec edx
mov dword [esp + 0x38], eax
mov dword [esp + 0x28], edx
jmp 0x46d234
mov ecx, dword [esp + 0x4c]
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x28]
mov edi, dword [esp + 0x14]
lea ebp, [ecx + eax]
add edx, edi
cmp edx, dword [esp + 0xa4]
mov ebx, eax
mov dword [esp + 0x40], ebx
mov dword [esp + 0x48], ebp
mov ecx, eax
jge 0x46d26c
mov edi, dword [esp + 0x30]
mov edx, dword [esp + 0x44]
mov ecx, edi
sub ecx, edx
sub ebp, edx
add ecx, eax
add ebp, edi
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x18]
mov dword [esp + 0x20], eax
test eax, eax
jle 0x46d337
mov edi, dword [esp + 0x48]
mov eax, dword [esp + 0x34]
add edi, 2
sub eax, esi
mov dword [esp + 0x50], eax
movzx ebx, byte [ecx]
movzx eax, byte [edi - 2]
add eax, ebx
mov ebx, dword [esp + 0x40]
movzx ebx, byte [ebx]
add eax, ebx
movzx ebx, byte [ebp]
add eax, ebx
movzx ebx, byte [ebp + 1]
sar eax, 2
mov byte [esp + 0x10], al
movzx eax, byte [edi - 1]
add eax, ebx
movzx ebx, byte [ecx + 1]
add eax, ebx
mov ebx, dword [esp + 0x40]
movzx ebx, byte [ebx + 1]
add eax, ebx
movzx ebx, byte [ebp + 2]
sar eax, 2
mov byte [esp + 0x11], al
mov eax, dword [esp + 0x50]
movzx eax, byte [eax + edi]
add eax, ebx
movzx ebx, byte [ecx + 2]
add eax, ebx
movzx ebx, byte [edi]
add eax, ebx
mov ebx, dword [esp + 0xa8]
sar eax, 2
test ebx, ebx
jle 0x46d316
mov dword [esp + 0x48], ebx
lea esp, [esp]
mov bx, word [esp + 0x10]
mov word [edx], bx
mov byte [edx + 2], al
add edx, dword [esp + 0x3c]
sub dword [esp + 0x48], 1
jne 0x46d300
mov eax, dword [esp + 0x20]
mov ebx, dword [esp + 0x40]
dec eax
add ebx, esi
add edi, esi
add ecx, esi
add ebp, esi
mov dword [esp + 0x40], ebx
mov dword [esp + 0x20], eax
test eax, eax
jg 0x46d291
cmp dword [esp + 0x24], 0
jle 0x46d38d
movzx eax, byte [ecx]
movzx edi, byte [ebx]
add eax, edi
movzx edi, byte [ebx + 1]
sar eax, 1
mov byte [esp + 0x10], al
movzx eax, byte [ecx + 1]
add eax, edi
sar eax, 1
mov byte [esp + 0x11], al
movzx eax, byte [ecx + 2]
movzx ecx, byte [ebx + 2]
add eax, ecx
mov ecx, dword [esp + 0x24]
sar eax, 1
test ecx, ecx
jle 0x46d38d
mov di, word [esp + 0x10]
mov ebx, dword [esp + 0x3c]
lea esp, [esp]
mov word [edx], di
mov byte [edx + 2], al
add edx, ebx
sub ecx, 1
jne 0x46d380
mov ecx, dword [esp + 0x14]
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0xa4]
inc ecx
mov dword [esp + 0x50], edi
add edi, dword [esp + 0x2c]
lea ebx, [eax + ecx]
cmp ebx, edx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], edi
jl 0x46d3bc
mov eax, edx
sub eax, ecx
test eax, eax
jle 0x46d3ee
mov ebp, dword [esp + 0x3c]
imul ebp, dword [esp + 0xa0]
add dword [esp + 0x14], eax
mov ebx, eax
mov edx, dword [esp + 0x50]
push ebp
push edx
push edi
call fcn.004f37d0
add edi, dword [esp + 0x38]
add esp, 0xc
sub ebx, 1
jne 0x46d3d2
mov dword [esp + 0x18], edi
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0xa4]
add dword [esp + 0x1c], eax
cmp dword [esp + 0x14], ecx
jl 0x46d230
pop ebp
pop ebx
pop edi
mov eax, 1
pop esi
add esp, 0x74
ret
mov eax, dword [esp + 0x3c]
cmp eax, 2
jne 0x46d662
cmp dword [esp + 0x34], eax
jne 0x46d7fe
mov dword [esp + 0x14], 0
test ebp, ebp
jle 0x46d7fe
mov eax, dword [esp + 0xa0]
cdq
idiv dword [esp + 0xa8]
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0xac]
dec edx
mov dword [esp + 0x38], eax
mov dword [esp + 0x28], edx
mov edi, edi
mov ebx, dword [esp + 0x1c]
mov edx, dword [esp + 0x28]
mov edi, dword [esp + 0x14]
add edx, edi
cmp edx, dword [esp + 0xa4]
lea ecx, [esi + ebx - 2]
mov eax, ebx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x34], eax
mov dword [esp + 0x40], ecx
jge 0x46d4a3
mov edi, dword [esp + 0x30]
mov edx, dword [esp + 0x44]
mov eax, edi
sub eax, edx
add eax, ebx
sub ecx, edx
add ecx, edi
mov dword [esp + 0x34], eax
mov dword [esp + 0x40], ecx
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x3c], ecx
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x20], ecx
test ecx, ecx
jle 0x46d57e
jmp 0x46d4c0
movzx edi, word [eax]
movzx ecx, word [esi + ebx - 2]
movzx ebx, word [ebx]
mov edx, dword [esp + 0x40]
movzx edx, word [edx]
mov eax, ecx
and eax, 0x7c1f
mov ebp, ebx
and ebp, 0x7c1f
add eax, ebp
and ecx, 0x3e0
mov ebp, edi
and ebp, 0x7c1f
add eax, ebp
and ebx, 0x3e0
add ecx, ebx
mov ebp, edx
and edi, 0x3e0
add ecx, edi
and edx, 0x3e0
and ebp, 0x7c1f
add eax, ebp
add ecx, edx
mov edx, dword [esp + 0xa8]
sar eax, 2
sar ecx, 2
and eax, 0x7c1f
and ecx, 0x3e0
or eax, ecx
test edx, edx
jle 0x46d555
mov ebx, dword [esp + 0x3c]
movzx ebp, ax
mov eax, ebp
shl ebp, 0x10
or eax, ebp
mov ecx, edx
shr ecx, 1
mov edi, ebx
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
lea eax, [ebx + edx*2]
mov dword [esp + 0x3c], eax
mov ecx, dword [esp + 0x20]
mov ebx, dword [esp + 0x48]
mov eax, dword [esp + 0x34]
add dword [esp + 0x40], esi
dec ecx
add ebx, esi
add eax, esi
mov dword [esp + 0x48], ebx
mov dword [esp + 0x34], eax
mov dword [esp + 0x20], ecx
test ecx, ecx
jg 0x46d4c0
mov edi, dword [esp + 0x24]
mov ebp, dword [esp + 0x18]
test edi, edi
jle 0x46d5dd
movzx edx, word [eax]
movzx ecx, word [ebx]
mov eax, ecx
and eax, 0x3e0
mov ebx, edx
and ecx, 0x7c1f
and ebx, 0x3e0
add eax, ebx
and edx, 0x7c1f
add ecx, edx
sar eax, 1
sar ecx, 1
and eax, 0x3e0
and ecx, 0x7c1f
or eax, ecx
test edi, edi
jle 0x46d5dd
movzx edx, ax
mov ecx, edi
mov edi, dword [esp + 0x3c]
mov eax, edx
shl edx, 0x10
or eax, edx
shr ecx, 1
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0xa4]
inc ecx
mov dword [esp + 0x3c], ebp
add ebp, dword [esp + 0x2c]
lea edi, [edx + ecx]
cmp edi, eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], ebp
jge 0x46d608
mov eax, edx
jmp 0x46d60a
sub eax, ecx
test eax, eax
jle 0x46d63c
mov ebx, dword [esp + 0xa0]
add ebx, ebx
add dword [esp + 0x14], eax
mov edi, eax
lea ecx, [ecx]
mov eax, dword [esp + 0x3c]
push ebx
push eax
push ebp
call fcn.004f37d0
add ebp, dword [esp + 0x38]
add esp, 0xc
sub edi, 1
jne 0x46d620
mov dword [esp + 0x18], ebp
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x14]
add dword [esp + 0x1c], ecx
cmp edx, dword [esp + 0xa4]
jl 0x46d460
pop ebp
pop ebx
pop edi
mov eax, 1
pop esi
add esp, 0x74
ret
cmp eax, 1
jne 0x46d7fe
cmp dword [esp + 0x34], eax
jne 0x46d7fe
mov dword [esp + 0x14], 0
test ebp, ebp
jle 0x46d7fe
mov eax, dword [esp + 0xa0]
cdq
idiv dword [esp + 0xa8]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0xac]
dec eax
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], eax
jmp 0x46d6b0
mov edi, dword [esp + 0x1c]
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x14]
add ecx, edx
cmp ecx, dword [esp + 0xa4]
lea eax, [esi + edi - 1]
mov ebx, edi
mov ebp, eax
jge 0x46d6e3
mov edx, dword [esp + 0x30]
mov ecx, dword [esp + 0x44]
mov ebx, edx
sub ebx, ecx
sub eax, ecx
add ebx, edi
add eax, edx
mov ebp, eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x20], eax
test eax, eax
jle 0x46d75e
jmp 0x46d700
movzx edx, byte [edi]
movzx ecx, byte [esi + edi - 1]
add ecx, edx
movzx edx, byte [ebp]
add ecx, edx
movzx edx, byte [ebx]
add ecx, edx
sar ecx, 2
cmp dword [esp + 0xa8], 0
mov byte [esp + 0x3c], cl
jle 0x46d74f
mov eax, dword [esp + 0xa8]
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x40]
push eax
push ecx
push edx
call fcn.004f3750
mov eax, dword [esp + 0xb4]
add esp, 0xc
add dword [esp + 0x40], eax
mov eax, dword [esp + 0x20]
dec eax
add edi, esi
add ebx, esi
add ebp, esi
mov dword [esp + 0x20], eax
test eax, eax
jg 0x46d700
mov eax, dword [esp + 0x24]
test eax, eax
jle 0x46d78b
movzx ecx, byte [edi]
movzx edx, byte [ebx]
add ecx, edx
sar ecx, 1
mov byte [esp + 0x3c], cl
test eax, eax
jle 0x46d78b
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x40]
push eax
push ecx
push edx
call fcn.004f3750
add esp, 0xc
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0xa4]
mov ebp, eax
add eax, dword [esp + 0x2c]
inc ecx
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x28]
lea edi, [eax + ecx]
cmp edi, edx
mov dword [esp + 0x14], ecx
jl 0x46d7b8
mov eax, edx
sub eax, ecx
test eax, eax
jle 0x46d7e5
add dword [esp + 0x14], eax
mov edi, dword [esp + 0x18]
mov ebx, eax
mov eax, dword [esp + 0xa0]
push eax
push ebp
push edi
call fcn.004f37d0
add edi, dword [esp + 0x38]
add esp, 0xc
sub ebx, 1
jne 0x46d7c6
mov dword [esp + 0x18], edi
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0xa4]
add dword [esp + 0x1c], ecx
cmp dword [esp + 0x14], edx
jl 0x46d6b0
pop ebp
pop ebx
pop edi
mov eax, 1
pop esi
add esp, 0x74
ret
pop edi
xor eax, eax
pop esi
add esp, 0x74
ret