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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5bd065
mov eax, dword fs:[0]
push eax
sub esp, 0x7c
push esi
push edi
mov eax, dword [0x61dc40]
xor eax, esp
push eax
lea eax, [esp + 0x88]
mov dword fs:[0], eax
xor esi, esi
cmp dword [ebp + 8], esi
je 0x519d20
mov eax, dword [ebx + 0x10]
cmp dword [eax - 0xc], esi
je 0x5193cd
mov edi, ebx
call fcn.005190ed
cmp dword [ebx + 0x18], esi
jne 0x5193eb
push esi
call dword [sym.imp.GDI32.dll_GetStockObject]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_FillRect]
jmp 0x519d20
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.0044d602
and dword [esp + 0x90], 0
mov eax, dword [esp + 0x58]
and dword [esp + 0x58], 0
test eax, eax
jne 0x519d17
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 0x519483
push dword [esp + 0x18]
push esi
push dword [ebp + 0x18]
push dword [ebp + 0x14]
jmp 0x519cfc
cmp eax, 1
jne 0x51954f
cmp dword [ebp + 0x1c], 0
jne 0x5194a3
mov eax, dword [esp + 0x1c]
lea ecx, [eax - 1]
mov dword [ebp + 0x1c], ecx
cmp esi, eax
jne 0x5194a3
mov dword [ebp + 0x1c], eax
cmp dword [ebp + 0x20], 0
jne 0x5194bc
mov eax, dword [esp + 0x14]
lea ecx, [eax - 1]
mov dword [ebp + 0x20], ecx
cmp dword [esp + 0x18], eax
jne 0x5194bc
mov dword [ebp + 0x20], eax
mov eax, dword [ebp + 0x1c]
add eax, 2
cmp dword [ebx + 4], eax
jle 0x519544
mov edi, dword [ebp + 0x20]
push edi
push dword [ebp + 0x1c]
lea esi, [esp + 0x7c]
call fcn.00515e8e
mov eax, esi
lea esi, [esp + 0x4c]
call fcn.00515e2a
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.00518f8a
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.00518f8a
push dword [esp + 0x4c]
call sub.gdiplus.dll_GdipDeleteGraphics
push dword [esp + 0x78]
call sub.gdiplus.dll_GdipDisposeImage
jmp 0x519d0e
push dword [ebp + 0x20]
push dword [ebp + 0x1c]
jmp 0x519478
cmp eax, 2
jne 0x519763
mov eax, dword [ebp + 0x1c]
test eax, eax
jle 0x519563
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 0x20]
test eax, eax
jle 0x51956e
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.005138c4
mov dword [esp + 0x4c], eax
mov eax, edi
call fcn.005138c4
mov dword [esp + 0x50], eax
mov eax, dword [ebx + 0x18]
mov dword [esp + 0x20], eax
cmp dword [esp + 0x4c], esi
jne 0x5195ab
cmp dword [esp + 0x50], edi
je 0x51965d
push 0x10
call sub.gdiplus.dll_GdipAlloc
mov edi, eax
test edi, edi
je 0x5195e7
and dword [esp + 0x2c], 0
lea eax, [esp + 0x2c]
push eax
push dword [esp + 0x58]
mov dword [edi], vtable.Gdiplus::Bitmap.0
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 0x5195e9
xor eax, eax
mov dword [esp + 0x20], eax
test eax, eax
je 0x519656
lea esi, [esp + 0x34]
call fcn.00515e2a
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.00518f8a
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 0x51965d
mov eax, dword [ebx + 0x18]
mov dword [esp + 0x20], eax
and dword [esp + 0x1c], 0
cmp dword [esp + 0x18], 0
jle 0x519741
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 0x519723
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 0x5196b2
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 0x5196cb
mov ecx, dword [esp + 0x14]
cmp edi, dword [esp + 0x18]
jle 0x5196d5
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.00518f8a
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
add dword [esp + 0x14], eax
cmp edx, dword [esp + 0x10]
jl 0x5196ae
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 0x51967f
mov eax, dword [esp + 0x20]
cmp eax, dword [ebx + 0x18]
je 0x519d0e
test eax, eax
je 0x519d0e
mov ecx, eax
mov eax, dword [ecx]
push 1
call dword [eax]
jmp 0x519d0e
push 3
pop ecx
cmp eax, ecx
jne 0x5197ef
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.00518f8a
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.00518f8a
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 0x519cfc
cmp eax, 4
jne 0x51989e
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.00518f8a
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.00518f8a
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 0x519cfb
cmp eax, 5
jne 0x519a21
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 0x519d0e
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 0x51991f
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.00518f8a
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.00518f8a
mov eax, dword [esp + 0x1c]
cmp eax, dword [esp + 0x20]
jge 0x519a02
mov esi, dword [esp + 0x20]
mov ecx, eax
neg ecx
sub esi, eax
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x28], esi
jmp 0x519990
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 0x5199a7
mov edx, esi
mov esi, dword [esp + 0x18]
cmp dword [esp + 0x30], esi
jle 0x5199b5
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.00518f8a
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x34]
add dword [esp + 0x28], ecx
cmp eax, dword [esp + 0x20]
jl 0x51998c
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 0x5198e9
jmp 0x519d0e
cmp eax, 6
jne 0x519ae6
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x18]
ja 0x519a46
mov ecx, dword [esp + 0x1c]
cmp ecx, esi
ja 0x519a46
mov dword [esp + 0x70], eax
mov dword [esp + 0x6c], ecx
jmp 0x519a9d
mov dword [esp + 0x4c], eax
fild dword [esp + 0x4c]
test eax, eax
jge 0x519a58
fadd qword [0x5fdc58]
fild dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
fdiv st(1)
fild dword [esp + 0x1c]
test eax, eax
jge 0x519a70
fadd qword [0x5fdc58]
fild dword [esp + 0x10]
fdiv st(1)
fcom st(2)
fnstsw ax
test ah, 5
jp 0x519a83
fstp st(2)
jmp 0x519a85
fstp st(0)
fxch st(2)
fmul st(1)
call fcn.005969a0
fmulp st(1)
mov dword [esp + 0x70], eax
call fcn.005969a0
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 0x519ad5
mov dword [esp + 0x58], eax
push dword [esp + 0x14]
push dword [esp + 0x20]
push 0
push 0
jmp 0x519cfc
cmp eax, 7
jne 0x519b9a
mov eax, dword [ebp + 0x1c]
xor edx, edx
div ecx
mov dword [esp + 0x20], eax
test esi, esi
je 0x519d0e
cmp eax, esi
mov dword [esp + 0x6c], eax
jle 0x519b0e
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.00518f8a
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 0x519b61
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.00518f8a
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 0x519d0e
push dword [ebp + 0x20]
mov eax, dword [esp + 0x24]
mov ecx, dword [ebp + 0x14]
push eax
push 0
add eax, ecx
jmp 0x519cfb
cmp eax, 8
jne 0x519bb2
push dword [ebp + 0x24]
lea eax, [esp + 0x58]
push edi
push eax
mov eax, dword [ebx + 0x18]
call fcn.0053a272
jmp 0x519c07
cmp eax, 9
jne 0x519c0f
mov esi, dword [ebp + 0x1c]
test esi, esi
jne 0x519bc1
mov esi, dword [ebx + 4]
mov edx, dword [ebp + 0x20]
test edx, edx
jne 0x519bcb
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.0053a2bd
add esp, 0xc
jmp 0x519d0e
cmp eax, 0xa
jne 0x519d0e
mov eax, dword [ebp + 0x1c]
test eax, eax
jne 0x519c25
mov eax, dword [ebx + 4]
mov dword [ebp + 0x1c], eax
cmp dword [ebp + 0x20], 0
jne 0x519c31
mov edx, dword [ebx + 8]
mov dword [ebp + 0x20], edx
cmp dword [esp + 0x10], eax
jge 0x519c3b
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.005969a0
mov dword [esp + 0x1c], eax
imul eax, eax, 3
cmp dword [esp + 0x10], eax
jge 0x519c6e
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.00518f8a
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.00518f8a
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.00518f8a
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