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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5aaa29
mov eax, dword fs:[0]
push eax
sub esp, 0x7c
push esi
push edi
mov eax, dword [0x606c40]
xor eax, esp
push eax
lea eax, [esp + 0x88]
mov dword fs:[0], eax
xor esi, esi
cmp dword [ebp + 8], esi
je 0x5082af
mov eax, dword [ebx + 0x10]
cmp dword [eax - 0xc], esi
je 0x50795c
mov edi, ebx
call fcn.0050767c
cmp dword [ebx + 0x18], esi
jne 0x50797a
push esi
call dword [0x5b1070]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [0x5b1670]
jmp 0x5082af
mov edi, dword [ebp + 0xc]
mov eax, dword [edi + 8]
sub eax, dword [edi]
push dword [ebp + 8]
mov dword [esp + 0x14], eax
mov eax, dword [edi + 0xc]
sub eax, dword [edi + 4]
lea esi, [esp + 0x58]
mov dword [esp + 0x1c], eax
mov eax, dword [ebx + 4]
mov dword [esp + 0x20], eax
mov eax, dword [ebx + 8]
mov dword [esp + 0x18], eax
call fcn.0044af77
and dword [esp + 0x90], 0
mov eax, dword [esp + 0x58]
and dword [esp + 0x58], 0
test eax, eax
jne 0x5082a6
mov eax, dword [edi + 4]
mov ecx, dword [edi]
mov esi, dword [esp + 0x10]
and dword [esp + 0x5c], 0
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x70], eax
lea eax, [esp + 0x5c]
push eax
mov dword [esp + 0x68], ecx
mov dword [esp + 0x70], esi
call sub.gdiplus.dll_GdipCreateImageAttributes
mov dword [esp + 0x60], eax
mov eax, dword [ebp + 0x10]
mov byte [esp + 0x90], 1
test eax, eax
jne 0x507a12
push dword [esp + 0x18]
push esi
push dword [ebp + 0x18]
push dword [ebp + 0x14]
jmp 0x50828b
cmp eax, 1
jne 0x507ade
cmp dword [ebp + 0x1c], 0
jne 0x507a32
mov eax, dword [esp + 0x1c]
lea ecx, [eax - 1]
mov dword [ebp + 0x1c], ecx
cmp esi, eax
jne 0x507a32
mov dword [ebp + 0x1c], eax
cmp dword [ebp + 0x20], 0
jne 0x507a4b
mov eax, dword [esp + 0x14]
lea ecx, [eax - 1]
mov dword [ebp + 0x20], ecx
cmp dword [esp + 0x18], eax
jne 0x507a4b
mov dword [ebp + 0x20], eax
mov eax, dword [ebp + 0x1c]
add eax, 2
cmp dword [ebx + 4], eax
jle 0x507ad3
mov edi, dword [ebp + 0x20]
push edi
push dword [ebp + 0x1c]
lea esi, [esp + 0x7c]
call fcn.005044b4
mov eax, esi
lea esi, [esp + 0x4c]
call fcn.00504450
mov eax, dword [ebp + 0x1c]
and dword [esp + 0x3c], 0
and dword [esp + 0x40], 0
push edi
push eax
push dword [ebp + 0x18]
mov dword [esp + 0x50], eax
push dword [ebp + 0x14]
mov dword [esp + 0x58], edi
mov edi, dword [ebx + 0x18]
xor ecx, ecx
lea eax, [esp + 0x4c]
call fcn.00507519
push dword [ebp + 0x20]
xor ecx, ecx
push dword [ebp + 0x1c]
lea eax, [esp + 0x6c]
push 0
push 0
lea edi, [esp + 0x84]
lea esi, [esp + 0x64]
call fcn.00507519
push dword [esp + 0x4c]
call sub.gdiplus.dll_GdipDeleteGraphics
push dword [esp + 0x78]
call sub.gdiplus.dll_GdipDisposeImage
jmp 0x50829d
push dword [ebp + 0x20]
push dword [ebp + 0x1c]
jmp 0x507a07
cmp eax, 2
jne 0x507cf2
mov eax, dword [ebp + 0x1c]
test eax, eax
jle 0x507af2
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 0x20]
test eax, eax
jle 0x507afd
mov dword [esp + 0x14], eax
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x14]
mov eax, esi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x40], edi
call fcn.00501d54
mov dword [esp + 0x4c], eax
mov eax, edi
call fcn.00501d54
mov dword [esp + 0x50], eax
mov eax, dword [ebx + 0x18]
mov dword [esp + 0x20], eax
cmp dword [esp + 0x4c], esi
jne 0x507b3a
cmp dword [esp + 0x50], edi
je 0x507bec
push 0x10
call sub.gdiplus.dll_GdipAlloc
mov edi, eax
test edi, edi
je 0x507b76
and dword [esp + 0x2c], 0
lea eax, [esp + 0x2c]
push eax
push dword [esp + 0x58]
mov dword [edi], 0x5e5f44
push dword [esp + 0x58]
push dword [esp + 0x58]
call sub.gdiplus.dll_GdipCreateBitmapFromGraphics
mov dword [edi + 8], eax
mov eax, dword [esp + 0x2c]
mov dword [edi + 4], eax
mov eax, edi
jmp 0x507b78
xor eax, eax
mov dword [esp + 0x20], eax
test eax, eax
je 0x507be5
lea esi, [esp + 0x34]
call fcn.00504450
mov eax, dword [esp + 0x4c]
push dword [esp + 0x14]
and dword [esp + 0x78], 0
and dword [esp + 0x7c], 0
mov edi, dword [ebx + 0x18]
mov dword [esp + 0x80], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 0x84], eax
mov eax, dword [esp + 0x20]
dec eax
push eax
push dword [ebp + 0x18]
xor ecx, ecx
push dword [ebp + 0x14]
lea eax, [esp + 0x84]
call fcn.00507519
mov eax, dword [esp + 0x4c]
push dword [esp + 0x34]
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 0x44], eax
call sub.gdiplus.dll_GdipDeleteGraphics
jmp 0x507bec
mov eax, dword [ebx + 0x18]
mov dword [esp + 0x20], eax
and dword [esp + 0x1c], 0
cmp dword [esp + 0x18], 0
jle 0x507cd0
mov eax, dword [esp + 0x40]
neg eax
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x24], eax
xor edx, edx
cmp dword [esp + 0x10], edx
jle 0x507cb2
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x40]
lea edi, [eax + ecx]
mov eax, dword [esp + 0x3c]
neg eax
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x30], edi
mov dword [esp + 0x14], eax
jmp 0x507c41
mov edi, dword [esp + 0x30]
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x40]
lea esi, [edx + ecx]
cmp esi, dword [esp + 0x10]
mov dword [esp + 0x2c], esi
jle 0x507c5a
mov ecx, dword [esp + 0x14]
cmp edi, dword [esp + 0x18]
jle 0x507c64
mov eax, dword [esp + 0x24]
mov esi, dword [ebp + 0xc]
mov edi, dword [esi]
push eax
add edi, edx
mov edx, dword [esi + 4]
add edx, dword [esp + 0x20]
push ecx
push dword [ebp + 0x18]
mov dword [esp + 0x70], edi
push dword [ebp + 0x14]
mov edi, dword [esp + 0x30]
mov dword [esp + 0x7c], ecx
mov dword [esp + 0x80], eax
xor ecx, ecx
lea eax, [esp + 0x74]
lea esi, [esp + 0x64]
mov dword [esp + 0x78], edx
call fcn.00507519
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
add dword [esp + 0x14], eax
cmp edx, dword [esp + 0x10]
jl 0x507c3d
mov eax, dword [esp + 0x1c]
add eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x34]
add dword [esp + 0x24], ecx
cmp eax, dword [esp + 0x18]
mov dword [esp + 0x1c], eax
jl 0x507c0e
mov eax, dword [esp + 0x20]
cmp eax, dword [ebx + 0x18]
je 0x50829d
test eax, eax
je 0x50829d
mov ecx, eax
mov eax, dword [ecx]
push 1
call dword [eax]
jmp 0x50829d
push 3
pop ecx
cmp eax, ecx
jne 0x507d7e
mov eax, dword [esp + 0x1c]
xor edx, edx
div ecx
push dword [esp + 0x14]
mov edi, dword [ebx + 0x18]
xor ecx, ecx
lea esi, [esp + 0x58]
push eax
push 0
mov dword [esp + 0x38], eax
mov dword [esp + 0x78], eax
push 0
lea eax, [esp + 0x74]
call fcn.00507519
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 8]
mov eax, dword [esp + 0x2c]
push dword [esp + 0x14]
mov edi, dword [ebx + 0x18]
sub ecx, eax
push eax
mov dword [esp + 0x6c], ecx
lea ecx, [eax + eax]
push 0
mov dword [esp + 0x78], eax
push ecx
xor ecx, ecx
lea eax, [esp + 0x74]
call fcn.00507519
mov ecx, dword [esp + 0x2c]
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
push dword [esp + 0x14]
add eax, ecx
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x14]
push ecx
lea edx, [ecx + ecx]
sub eax, edx
push 0
mov dword [esp + 0x78], eax
push ecx
jmp 0x50828b
cmp eax, 4
jne 0x507e2d
mov eax, dword [esp + 0x1c]
xor edx, edx
div ecx
push dword [esp + 0x14]
mov edi, dword [ebx + 0x18]
lea esi, [esp + 0x58]
mov ecx, eax
mov eax, dword [esp + 0x14]
sub eax, ecx
cdq
sub eax, edx
mov edx, dword [ebp + 0xc]
mov edx, dword [edx]
push ecx
sar eax, 1
push 0
add edx, eax
mov dword [esp + 0x38], ecx
mov dword [esp + 0x30], eax
mov dword [esp + 0x78], ecx
push ecx
xor ecx, ecx
lea eax, [esp + 0x74]
mov dword [esp + 0x74], edx
call fcn.00507519
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
push dword [esp + 0x14]
mov edi, dword [ebx + 0x18]
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x30]
dec eax
push eax
push 0
push 0
xor ecx, ecx
lea eax, [esp + 0x74]
call fcn.00507519
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
add eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x2c]
push dword [esp + 0x14]
add eax, ecx
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x14]
sub eax, dword [esp + 0x28]
sub eax, ecx
mov dword [esp + 0x70], eax
lea eax, [ecx - 1]
push eax
push 0
lea eax, [ecx + ecx]
jmp 0x50828a
cmp eax, 5
jne 0x507fb0
mov eax, dword [esp + 0x1c]
xor edx, edx
div ecx
and dword [esp + 0x2c], 0
cmp dword [esp + 0x18], 0
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x24], eax
jle 0x50829d
mov eax, dword [esp + 0x10]
sub eax, dword [esp + 0x1c]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x14]
neg eax
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
mov dword [esp + 0x64], ecx
mov ecx, dword [eax + 4]
mov eax, dword [esp + 0x2c]
add ecx, eax
mov dword [esp + 0x68], ecx
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x6c], ecx
mov ecx, dword [esp + 0x14]
add eax, ecx
cmp eax, dword [esp + 0x18]
mov dword [esp + 0x30], eax
jle 0x507eae
mov eax, dword [esp + 0x10]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x24]
mov edi, dword [ebx + 0x18]
push eax
push dword [esp + 0x20]
mov dword [esp + 0x78], eax
push 0
push 0
xor ecx, ecx
lea eax, [esp + 0x74]
lea esi, [esp + 0x64]
call fcn.00507519
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 8]
push dword [esp + 0x24]
mov eax, dword [esp + 0x20]
mov edi, dword [ebx + 0x18]
push eax
sub ecx, eax
add eax, eax
push 0
mov dword [esp + 0x70], ecx
push eax
xor ecx, ecx
lea eax, [esp + 0x74]
call fcn.00507519
mov eax, dword [esp + 0x1c]
cmp eax, dword [esp + 0x20]
jge 0x507f91
mov esi, dword [esp + 0x20]
mov ecx, eax
neg ecx
sub esi, eax
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x28], esi
jmp 0x507f1f
mov esi, dword [esp + 0x28]
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x14]
lea edi, [eax + edx]
cmp edi, dword [esp + 0x20]
mov dword [esp + 0x34], edi
jle 0x507f36
mov edx, esi
mov esi, dword [esp + 0x18]
cmp dword [esp + 0x30], esi
jle 0x507f44
mov ecx, dword [esp + 0x10]
mov esi, dword [ebp + 0xc]
mov edi, dword [esi]
add edi, eax
mov eax, dword [esi + 4]
add eax, dword [esp + 0x2c]
push ecx
push edx
push 0
push dword [esp + 0x28]
mov dword [esp + 0x74], edi
mov edi, dword [ebx + 0x18]
mov dword [esp + 0x78], eax
mov dword [esp + 0x80], ecx
xor ecx, ecx
lea eax, [esp + 0x74]
lea esi, [esp + 0x64]
mov dword [esp + 0x7c], edx
call fcn.00507519
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x34]
add dword [esp + 0x28], ecx
cmp eax, dword [esp + 0x20]
jl 0x507f1b
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x4c]
add dword [esp + 0x10], ecx
cmp eax, dword [esp + 0x18]
mov dword [esp + 0x2c], eax
jl 0x507e78
jmp 0x50829d
cmp eax, 6
jne 0x508075
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x18]
ja 0x507fd5
mov ecx, dword [esp + 0x1c]
cmp ecx, esi
ja 0x507fd5
mov dword [esp + 0x70], eax
mov dword [esp + 0x6c], ecx
jmp 0x50802c
mov dword [esp + 0x4c], eax
fild dword [esp + 0x4c]
test eax, eax
jge 0x507fe7
fadd qword [0x5e8668]
fild dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
fdiv st(1)
fild dword [esp + 0x1c]
test eax, eax
jge 0x507fff
fadd qword [0x5e8668]
fild dword [esp + 0x10]
fdiv st(1)
fcom st(2)
fnstsw ax
test ah, 5
jp 0x508012
fstp st(2)
jmp 0x508014
fstp st(0)
fxch st(2)
fmul st(1)
call fcn.00584c30
fmulp st(1)
mov dword [esp + 0x70], eax
call fcn.00584c30
mov dword [esp + 0x6c], eax
mov eax, esi
sub eax, dword [esp + 0x6c]
push 7
cdq
push dword [esp + 0x58]
sub eax, edx
sar eax, 1
add eax, dword [edi]
mov dword [esp + 0x6c], eax
mov eax, dword [esp + 0x20]
sub eax, dword [esp + 0x78]
cdq
sub eax, edx
sar eax, 1
add eax, dword [edi + 4]
mov dword [esp + 0x70], eax
call sub.gdiplus.dll_GdipSetInterpolationMode
test eax, eax
je 0x508064
mov dword [esp + 0x58], eax
push dword [esp + 0x14]
push dword [esp + 0x20]
push 0
push 0
jmp 0x50828b
cmp eax, 7
jne 0x508129
mov eax, dword [ebp + 0x1c]
xor edx, edx
div ecx
mov dword [esp + 0x20], eax
test esi, esi
je 0x50829d
cmp eax, esi
mov dword [esp + 0x6c], eax
jle 0x50809d
mov dword [esp + 0x6c], esi
push dword [ebp + 0x20]
mov edi, dword [ebx + 0x18]
push dword [esp + 0x24]
xor ecx, ecx
push 0
push dword [ebp + 0x14]
lea eax, [esp + 0x74]
lea esi, [esp + 0x64]
call fcn.00507519
mov ecx, dword [ebp + 0xc]
mov edx, dword [esp + 0x20]
mov eax, dword [ecx + 8]
sub eax, edx
cmp eax, dword [ecx]
mov dword [esp + 0x64], eax
mov dword [esp + 0x6c], edx
jle 0x5080f0
push dword [ebp + 0x20]
mov ecx, dword [ebp + 0x14]
mov edi, dword [ebx + 0x18]
mov eax, edx
push eax
lea eax, [ecx + eax*2]
push 0
push eax
xor ecx, ecx
lea eax, [esp + 0x74]
call fcn.00507519
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
mov eax, dword [esp + 0x20]
add ecx, eax
add eax, eax
mov dword [esp + 0x64], ecx
mov ecx, eax
mov eax, dword [esp + 0x10]
sub eax, ecx
mov dword [esp + 0x6c], eax
test eax, eax
jle 0x50829d
push dword [ebp + 0x20]
mov eax, dword [esp + 0x24]
mov ecx, dword [ebp + 0x14]
push eax
push 0
add eax, ecx
jmp 0x50828a
cmp eax, 8
jne 0x508141
push dword [ebp + 0x24]
lea eax, [esp + 0x58]
push edi
push eax
mov eax, dword [ebx + 0x18]
call fcn.005286fd
jmp 0x508196
cmp eax, 9
jne 0x50819e
mov esi, dword [ebp + 0x1c]
test esi, esi
jne 0x508150
mov esi, dword [ebx + 4]
mov edx, dword [ebp + 0x20]
test edx, edx
jne 0x50815a
mov edx, dword [ebx + 8]
mov eax, dword [ebp + 0x18]
push dword [ebp + 0x24]
mov ecx, dword [ebp + 0x14]
push dword [ebx + 0x18]
mov dword [esp + 0x80], eax
add eax, edx
mov dword [esp + 0x7c], ecx
mov dword [esp + 0x88], eax
add ecx, esi
lea eax, [esp + 0x5c]
mov dword [esp + 0x84], ecx
push eax
lea eax, [esp + 0x80]
mov ecx, edi
call fcn.00528748
add esp, 0xc
jmp 0x50829d
cmp eax, 0xa
jne 0x50829d
mov eax, dword [ebp + 0x1c]
test eax, eax
jne 0x5081b4
mov eax, dword [ebx + 4]
mov dword [ebp + 0x1c], eax
cmp dword [ebp + 0x20], 0
jne 0x5081c0
mov edx, dword [ebx + 8]
mov dword [ebp + 0x20], edx
cmp dword [esp + 0x10], eax
jge 0x5081ca
mov eax, dword [esp + 0x10]
cdq
idiv ecx
mov esi, eax
mov eax, dword [esp + 0x18]
cdq
idiv dword [ebp + 0x20]
mov dword [esp + 0x20], esi
mov dword [esp + 0x4c], eax
fild dword [esp + 0x4c]
fimul dword [esp + 0x20]
call fcn.00584c30
mov dword [esp + 0x1c], eax
imul eax, eax, 3
cmp dword [esp + 0x10], eax
jge 0x5081fd
mov dword [esp + 0x1c], esi
push dword [ebp + 0x20]
mov eax, dword [esp + 0x20]
push dword [esp + 0x24]
mov edi, dword [ebx + 0x18]
push dword [ebp + 0x18]
mov dword [esp + 0x78], eax
push dword [ebp + 0x14]
xor ecx, ecx
lea eax, [esp + 0x74]
lea esi, [esp + 0x64]
call fcn.00507519
mov eax, dword [esp + 0x1c]
add dword [esp + 0x64], eax
mov ecx, dword [esp + 0x10]
push dword [ebp + 0x20]
mov edx, dword [ebp + 0x1c]
mov edi, dword [ebx + 0x18]
add eax, eax
sub ecx, eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0x70], ecx
lea ecx, [eax + eax]
sub edx, ecx
mov ecx, dword [ebp + 0x14]
push edx
push dword [ebp + 0x18]
add eax, ecx
push eax
xor ecx, ecx
lea eax, [esp + 0x74]
call fcn.00507519
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
mov eax, dword [esp + 0x1c]
push dword [ebp + 0x20]
sub ecx, eax
add ecx, dword [esp + 0x14]
push dword [esp + 0x24]
mov dword [esp + 0x74], eax
mov eax, dword [ebp + 0x14]
sub eax, dword [esp + 0x28]
push dword [ebp + 0x18]
add eax, dword [ebp + 0x1c]
mov dword [esp + 0x70], ecx
push eax
mov edi, dword [ebx + 0x18]
xor ecx, ecx
lea eax, [esp + 0x74]
lea esi, [esp + 0x64]
call fcn.00507519
push dword [esp + 0x5c]
call sub.gdiplus.dll_GdipDisposeImageAttributes
push dword [esp + 0x54]
call sub.gdiplus.dll_GdipDeleteGraphics
mov ecx, dword [esp + 0x88]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x20